angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

set ng-link directive dynamically #355

Closed maciossek closed 3 years ago

maciossek commented 9 years ago

ng-link="app.toolassembly({ id: {{buttonOverviewCtrl.currentToolAssemblyId}} })" is correctly rendered in html, but ng-link does not seem to be updated after currentToolAssemblyId changes.

HTML: ng-link="app.toolassembly({ id: 42 })" Resulting URL when click:/myapp/toolassembly/undefined"

kenkouot commented 9 years ago

I believe the correct syntax is:

ng-link="myRoute({ myId: myModel.value})"
maciossek commented 9 years ago

I am using the correct syntax though, but when I call $digest on the rootscope the link is still undefined