Unfortunately this is not the case.
doing below in my directive does not make a difference
controller: function($scope, $state) {
$scope.state = $state.current.name;
},
template: '<span>{{state}}</span>'
On Friday, April 17, 2015 at 12:32:47 AM UTC-4, Sander Elias wrote:
>
> Hi Jim,
>
> You are using an alert. That fires when your directive becomes active.
> Assuming your directive is outside your views, the state is not set by
> then.
> I assume you want to put something visual in. Create a isolated scope, do
> something like `scope.state = $state`, and put `{{state.current.name}}`
> in the template.
> As I'm not using uiRouter, it is not certain that this will work tough ;)
>
> Does this help you?
> Regards
> Sander
>
--
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.