angularjs - Add text parameters in angular ui-sref -
i trying add parameters ui-sref. if try works
<a ui-sref="services.test({ id: 2 , other_id: 3 })">test</a>
but if try don't work
<a ui-sref="services.test({ id: firstexmple , other_id: secondone })">test</a>
if try set id
literal value "firstexample" , other_id
"secondone" need write them write strings in plain javascript code, so:
<a ui-sref="services.test({ id: 'firstexmple' , other_id: 'secondone' })">test</a>
(mind can't use double quotes (like id: "firstexmple"
) because you're using them wrap whole ui-sref
attribute's value.
Comments
Post a Comment