Skip to content

Instantly share code, notes, and snippets.

@mustmodify
Created May 7, 2013 19:55
Show Gist options
  • Save mustmodify/5535599 to your computer and use it in GitHub Desktop.
Save mustmodify/5535599 to your computer and use it in GitHub Desktop.
commit 2a5a0d30f104fd1e6326f3ed6ca6484e9819939c
Author: Johnathon E. Wright <[email protected]>
Date: Tue May 7 12:54:11 2013 -0700
diff --git a/app.js b/app.js
index 5d0eb14..a0568df 100644
--- a/app.js
+++ b/app.js
@@ -18,8 +18,11 @@ app.controller('MainCtrl', function($scope) {
window.map = new MQA.TileMap(options);
};
- $scope.$on('$routeChangeSuccess', function(next, current) {
- $scope.draw_map();
+ $scope.$on('$routeChangeSuccess', function(next, current, $location) {
+ if( $location != undefined )
+ {
+ $scope.draw_map();
+ }
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment