Con you please tell how to call the view page after all the operations done in the controller. Currently i am facing issues as in javascript, i am assigning a variable which will come after calling a service from controller and the data from services will come after some time.
|
From this controller i want to fetch map information from my lat long after certain interval of time but in the view page i am getting the map information but after fraction of seconds so i am facing problem in the google map as the variable which i defined in view page is undefined for fraction of second. I tried by setting the value in a hidden variable and getting the data but the variable defined in script is undefined.
|
|||||
|
I'm no expert so i'm sure someone with more experience will chime in. I'm pretty sure you need to initialize the module correctly. Your example doesn't appear have any dependencies defined (i.e. $scope, $location...etc).
Also if you want the module to run you need to link onto the page. More of your code and setup is needed to provide a better answer. You also need to define Services. uh, I believe it's called a Factory that takes care of that which needs to be referenced in a dependency in the controller dependencies array. Seeing your services code would help. Overall it sounds like you aren't passing the location data to the controller. |
|||
|