I have one view page with followed structure:
==============================================
| Config | Map | Charts |
===============================================
| | | |
| | | |
The $routeProvider for this page looks like:
var app = angular.module('cntsApp', ['ngRoute', 'ui.bootstrap','LocalStorageModule']);
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/mapboard/',
{templateUrl: 'app/partials/cnts.html',
controller: 'CntsCtrl'});
}]);
cnts.html:
<div ng-include=" '/app/partials/config.html' "></div>
<div ng-include=" '/app/partials/map.html' "></div>
<div ng-include=" '/app/partials/chart.html' "></div>
All 3 HTMLs have the same scope (a.e. under one controller named 'CntsCtrl').
I want to split scope to 3 controllers.
My problem is if I'll add ng-controller for each HTML (config, map, chart) , the controllers actually will be children of CntsCtrl. And scope hierarchy will be:
rootScope
-> CntsCtrl
-> ConfigCtrl
-> MapCtrl
-> ChartCtrl
But I want:
rootScope
-> ConfigCtrl
-> MapCtrl
-> ChartCtrl
How can I achieve that?
Thanks,