Dynamically set the value of ui-sref Angularjs

前端 未结 12 1819
囚心锁ツ
囚心锁ツ 2020-11-28 04:15

I have searched for a similar question but the ones that came up seem slightly different. I am trying to change the ui-sref=\'\' of a link dynamically (this link points to t

12条回答
  •  醉话见心
    2020-11-28 04:55

    this is just working for me

    in controller

    $scope.createState = 'stateName';
    

    in view

    ui-sref="{{ createState }}"
    

提交回复
热议问题