Closed mateusz-c closed 9 years ago
I think you need the additional states just for the ncyBreadcrumbs. That's what I've had to do.
I work on a complex application and I could also use a way to manually insert a breadcrumb in a breadcrumb chain.
I can see there: https://github.com/ncuillery/angular-breadcrumb/wiki/API-Reference#methods-1 That it is possible to get the states with getStatesChain(). Could we also have a setStatesChain() ? That way we could maybe create fake states like School and Class in your case and insert them into the chain.
Ideally, we could just manipulate, via the service, the breadcrumbs items if needed.
This feature seems very dirty to me. I won't do that.
The ui-router is flexible enough to fit your needs with abstract states and targeting view.
That's indeed what I have used. But it's not any cleaner than allowing direct edit of the breadcrumbs chain. There are some very specific cases, in complicated applications that could use such a feature.
But thanks anyway.
I need to have the breadcrumb like : HomePage / School / Class / Pupil , where there are only 2 views: for a pupil and the main page. School and Class refers to HomePage but with selected additional fields and some div showed/hidden. What is the best way to do something like that ? Write 2 additional states only to set ncyBreadcrumbs parent and label or is the better way ?