I am creating an admin template using this latest routing .This works as follows -
1)index.html load with login component as ng-viewport.
2)after login i want a base component with header,footer,and menus to load in the ng-viewport of index.html and upon calling specific page like add user page ,i want to load user component to load in another ng-viewport of my base component .So it will be like --
index.html (ng-viewport)--->base.html(ng-viewport)--->addUser.html
or
index.html (ng-viewport)--->base.html(ng-viewport)--->someothercomponent.html
How can i achieve this ?
My approach --->
1)app.module.js
var app = angular.module('app', ['ngNewRouter', 'ngResource', 'kendo.directives']).controller('AppController', ['$router', AppController]);
I am creating an admin template using this latest routing .This works as follows - 1)index.html load with login component as ng-viewport. 2)after login i want a base component with header,footer,and menus to load in the ng-viewport of index.html and upon calling specific page like add user page ,i want to load user component to load in another ng-viewport of my base component .So it will be like -- index.html (ng-viewport)--->base.html(ng-viewport)--->addUser.html or index.html (ng-viewport)--->base.html(ng-viewport)--->someothercomponent.html
How can i achieve this ? My approach --->
1)app.module.js
var app = angular.module('app', ['ngNewRouter', 'ngResource', 'kendo.directives']).controller('AppController', ['$router', AppController]);
function AppController ($router) {
}
2)app.route.js
AppController.$routeConfig = [ { path: '/', redirectTo: '/home' }, { path: '/home', component: 'home' }, { path: '/login', component: 'login' }, { path: '/signup', component: 'signup' }, { path: '/app', component : 'base'}
];
3)base.js
app.controller('BaseController', function($router) {
$router.config([
]);
}); I m getting this error in my firebug console :::: Error: instruction.viewports[Object.keys(...)[0]] is undefined with no success Need help :(