For some reason my $state.$current.path is an empty array. Even on a
state/url with domain/segment1/segment2
On Tuesday, March 12, 2013 9:58:31 PM UTC-5, Bernd Wessels wrote:
>
> Hello,
>
> I am using the awesome *ui-states* router in my project. It is fantastic
> !!!
>
> Today I added breadcrumbs to my project and wanted the breadcrumbs to be
> automated.
>
> Automated means, that based on the current route, the breadcrumbs should
> update their titles and routes with the correct parameters.
>
> Here is what I came up with:
>
> <ul class="breadcrumb">
> <li ng-repeat="state in $state.$current.path">
> <a
> href="#{{$state.$current.path[$index].url.format($stateParams)}}">{{state.data.title}}</a>
> <span ng-hide="$last" class="divider">/</span>
> </li>
> </ul>
>
> I would love some feedback on this. Maybe there is even a simpler way?
>
> To clarify, I don't use programmatic transition because I try to keep
> everything in my project bookmarkable.
>
> Best regards
> Bernd
>
--
--
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.