I am trying to create a framework for applications that would have nested
states loaded dynamically, or so do I think. I am adapting some code for
that.
Here is main page:
li><a ui-sref="body.reports.extended">Reports</a></li>
div ui-view=""></div>
main.module.js
main = angular.module('main', ["ui.router", "ngRoute", "ngResource",
"main.reports"]);
main.config(
function ($stateProvider) {
$stateProvider
//////////////
// main application area //
//////////////
.state('body', {
url: '/',
template: '<div ui-view />'
})
});
reports.module.js
reports = angular.module('main.reports', []);
reports.config(
function ($stateProvider) {
$stateProvider
.state('body.reports', {
abstract: true,
})
.state('body.reports.extended', {
url: 'reports',
templateUrl: 'reports/reports.html'
})
});
reports.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div ui-view></div>
<h3>Reports</h3>
</body>
</html>
I dont see word Reports while console says that a page reports.html has
been loaded.
Thanks for help.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.