AngularJS Router Nested views with Nested states

AngularJS Router Nested views with Nested states

In this Post We Will Explain About is AngularJS Router Nested views with Nested states With Example and Demo.Welcome on infinityknow.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to AngularJS Nested views with Nested states using RoutingExample

In this post we will show you Best way to implement angularjs – ui router – nested views with shared controller, hear for Creating Nested States with AngularJS UI Routerwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

READ :  10 Keys About Lunch Box With Ice Pack Compartment

Make a HTML file and define markup

[php]

infinityknow.com : – AngularJS – Nested views

http://jquery.js
http://angular.min.js
http://angular-ui-router.min.js
http://ui-bootstrap-tpls.min.js
http://bootstrap.min.js

status:

home

second_level

create new
view list

create new second_level

  • second_level 1
  • second_level 2
  • second_level 3
first_levels

create new
view list

create new first_level

  • first_level 1
  • first_level 2
  • first_level 3

[/php]

Make a js file and define scripting

[php]
var liveApp = angular.module(‘liveApp’, [‘ui.router’]);
liveApp.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise(“/index”);
$stateProvider

// index
.state(‘index’, {
url: “/index”,
views: {
‘menu-view’: {
templateUrl:”menu.html”
},
‘container-view’: {
templateUrl:”home.html”
},
‘left-view@index’ :{
templateUrl:”second_level.html”
},
‘right-view@index’ :{
templateUrl:”first_levels.html”
},
‘status-view’: {
template:”

index


},
},
})

READ :  vuejs Dynamic component HTML Templates data

// second_level
.state(‘second_level’, {
url: “/second_level”,
views: {
‘menu-view’: {
templateUrl:”menu.html”
},
‘container-view’: {
templateUrl:”second_level.html”
},
‘status-view’: {
template:”

second_level


},
},
})

// second_level, create substate
.state(‘second_level.create’, {
url: “/create”,
views: {
‘bottom-view@second_level’: {
templateUrl:”second_level.create.html”
},
‘status-view@’: {
template:”

second_level.create


},
},
})

// second_level, list substate
.state(‘second_level.list’, {
url: “/list”,
views: {
‘bottom-view@second_level’: {
templateUrl:”second_level.list.html”
},
‘status-view@’: {
template:”

second_level.list


},
},
})

// first_levels
.state(‘first_levels’, {
url: “/first_levels”,
views: {
‘menu-view’: {
templateUrl:”menu.html”
},
‘container-view’: {
templateUrl:”first_levels.html”
},
‘status-view’: {
template:”

first_levels


},
},
})

// first_levels, create substate
.state(‘first_levels.create’, {
url: “/create”,
views: {
‘bottom-view@first_levels’: {
templateUrl:”first_levels.create.html”
},
‘status-view@’: {
template:”

first_levels.create


},
},
})

// first_levels, list substate
.state(‘first_levels.list’, {
url: “/list”,
views: {
‘bottom-view@first_levels’: {
templateUrl:”first_levels.list.html”
},
‘status-view@’: {
template:”

READ :  vuejs-datepicker vuejs datetimepicker - Vuejs Calendar Example

first_levels.list


},
},
})
});
[/php]

Example

I hope you have Got What is AngularJS UI-Router Nested Views And how it works.I would Like to have FeadBack From My Blog(infinityknow.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(infinityknow.com) Are Most Always Welcome.

Leave a Comment