I have the following code:
main module:
app.config(
function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('body', {
url: '/',
abstract: true,
template: '<div ui-view />'
})
});
Module1:
module1 = angular.module('app.module1', []);
reports.config(
function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('body.module1', {
url: 'urlModule1',
templateUrl: 'template_module1',
controller: 'controller_module1'
})
});
template_module1
.....
<div ui-view></div>
controller_module1
$scope.dataForTemplate="somedata"
main app:
<a ui-sref="body.module1">Run Module 1</a>
When I click on link in the main app I get template_module1 shown but but
no "somedata" is in there. Clicking on the link again will show data.
I am tracing my controller and I see that it defines data on the first
click.
Please help.
Thanks
--
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.