I am devloping a single web page with angularJS. The page should display contents from another services which will return values as JSON.
I am using like below,
View file:
<div ng-app="phonecat">
<div ng-view></div>
</div>
<div ng-app="tabletcat">
<div ng-view></div>
</div>
app js file
angular.module('phonecat', []).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('', {templateUrl: 'partials/phone-list.html', controller: PhoneListCtrl}).
otherwise({redirectTo: '/phones'});
}]);
angular.module('tabletcat', []).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('', {templateUrl: 'partials/tablet-list.html', controller: TabListCtrl}).
otherwise({redirectTo: '/phones'});
}]);
it displays the phone list properly. But it is not triggering the tablet list.
Suggest me the best practice to achieve this.