I have been reading about nested views and multiple views but I can't find an example using both
In a landing page I have multiple views, one after other. A picture speaks a thousand words:
To consider:
/view1
, /view2
, /view3
, etc. /view1/b
or /view3/b
and showing subview ( view1.b
or view3.b
). I have success doing tasks separately but not all together.
you can use $statePorivder nested view with
config(function ($stateProvider) {
$stateProvider
.state('main', {
url: '/',
views: {
'': {
templateUrl: 'app/main/layout.html',
controller: 'LayoutController'
},
'header@main': {
templateUrl: 'app/main/header/layout.html',
controller: require("./headerController.js")
},
'left@main': {
templateUrl: 'app/main/left/layout.html',
controller: require("./leftController.js")
},
'content@main': {
templateUrl: 'app/main/content/layout.html',
controller: require("./conentController.js")
},
'right@main': {
templateUrl: 'app/main/right/layout.html',
controller: require("./rightController.js")
}
}
});
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.