I have implemented two controllers, 'BaseController' and 'SubController', for my main application and sub-application. Both controllers are configured to point to an empty URL.
Below is the configuration for the main application:-
angular.module("main-app").config(["$stateProvider", "$urlRouterProvider", function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('base', {
url: "",
views: {
"base": {
controller: 'BaseController'
}
}
});
}]);
And here is the configuration for the sub-application:-
angular.module("sub-app").config(["$stateProvider", "$urlRouterProvider", function ($stateProvider, $urlRouterProvider) {
//$locationProvider.html5Mode(true);
$stateProvider
.state('sub', {
url: "",
views: {
"patients": {
templateUrl:"templates/scope/patients/patients_search.html",
controller: 'PatientsController'
}
},
});
}]);
The main application includes the sub-application.
How can I ensure that both controllers are loaded with the same empty URL?