ng-init only runs once, when the app starts up. You probably want to attach
the state to your scope in an event listener like:
$scope.$on('$stateChangeSuccess', function (event, state) {
$scope.state = state;
});
On Fri, Jan 24, 2014 at 10:55 AM, Brad McAlister
<[email protected]>wrote:
> I'd like to be able to display the current state. Sorry I typed "view" and
> I meant "state". So in the plunker preview I can't see the current url when
> the links are clicked so I'd like to display that in the view so I know
> what the current state/route is.
>
>
> On Friday, January 24, 2014 9:42:47 AM UTC-6, Chris Rhoden wrote:
>
>> I'm having a hard time understanding what you're trying to accomplish.
>> Can you explain what you're expecting to happen here?
>>
>>
>> On Fri, Jan 24, 2014 at 10:36 AM, Brad McAlister <[email protected]>wrote:
>>
>>> I'm having trouble showing the current view in my html. It should be
>>> simple but what I've done seems like it should work but it's not. What am I
>>> missing?
>>>
>>> http://plnkr.co/edit/2PkV4D73Odc4SJq5nHaz?p=preview
>>>
>>> --
>>> 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/groups/opt_out.
>>>
>>
>>
>>
>> --
>> chrisrhoden
>>
> --
> 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/groups/opt_out.
>
--
chrisrhoden
--
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/groups/opt_out.