I have an angular application. In all of my HTML pages, I have 2 controller: "mainCtrl" and "thatPageCtrl"
I need to define queue for controllers. I want to launch mainCtrl first, after complete execution of mainCtrl, I want to load thatPageCtrl.
I'm authenticating users in all the route in mainCtrl, and I want to launch thatPageCtrl if authentication is true. And I'm binding some data to all pages in mainCtrl and I need to launch thatPageCtrl after these data bind completely from mainCtrl.
How can I do that?
My angular config code:
/* Assign Angular Application Name */
var dashboardApp = angular.module("dashboardApp" , ['ngRoute' , 'ngFileUpload']);
/* Configuration Ajax Routing */
dashboardApp.config(['$routeProvider' , '$locationProvider' , function($routeProvider , $locationProvider){
$routeProvider.
when("/home" ,
{templateUrl : "/home.html"}).
when("/signin" ,
{templateUrl : "/signin.html"}).
otherwise({templateUrl : "/home.html"});
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
}]);
No comments:
Post a Comment