Goa Goa - 2 months ago 9
AngularJS Question

Passing information to another state with ui-router and $stateParams

I've got a gist here : https://gist.github.com/RobinDesir/e6e1d8780f84f4be27b7

What i'm trying to do is to go to a device page using ui-router (see the app.js). However, the redirection never work and I can't figure out why.

Answer

Angular router uses ui-sref to navigate between states.

ui-sref="bleDetail({deviceId: device.id})"

EDIT:

You can also use this notation but it's not recommended to do so:

href="#/bleDetail/{{device.id}}"
Comments