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

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -