angularjs - How do i use ui-sref with multiple parameter -
in ui-sref
, need add 2 states ui-sref="form.profile.retail , form.profile.corporate"
, not sure how this, have tried using conditional operator didnt work.
in form.html
<a ui-sref-active="active" ui-sref="form.profile.retail"><span>2</span> login</a>
here plunker
thanks
you can use ng-switch
determine link place, cannot understand conditional needs i'll place example.
assign scope variable isretail
define when link should 1 or another:
<div ng-switch on="isretail"> <a ui-sref-active="active" ui-sref="form.profile.retail" ng-switch-when="true">retail</a> <a ui-sref-active="active" ui-sref="form.profile.corporate" ng-switch-default>corporate</a> </div>
Comments
Post a Comment