Angular module is defined as :
angular.module('module1',['ngRoute']);
Route for module1 is defined as
module1.config(function($routeProvider)
{
$routeProvider
.when('/Application1',
{
templateUrl: 'Application1/Application1_HomePage.html',
})
.otherwise({
templateUrl: 'MainPage.html',
controller: 'ctrl'
)}
});
And the controller ctrl is defined as:
module1.controller('ctrl',function($scope,$location)
{
$scope.goToApp1 = function()
{
$location.path('/Application1',true);
}
});
The shell page is as :
<html ng-app="module1">
<body>
<div ng-view> </div>
</body>
</html>
Application1_HomePage.html contains another ng-app than the shell page ng-app module1.
From the shell page shown above, when a call to Application1_HomePage.html is made through routeProvider, initialization of ng-app written inside Application1_HomePage.html is failing. The browser inspector clearly shows nothing out of the DOM.
Considering the above scenario how can I make a navigation from one ng-app to another ng-app?