How to prevent redirecting in Angular Js1.2

后端 未结 9 2054
情歌与酒
情歌与酒 2020-12-24 02:09

I was using AngularJs-1.0.7 and Bootstrap in my application. Recently I migrated from AngularJs-1.0.7 to AngularJs-1.2. I am using Bootstrap\'s Accordions and Tabs.

9条回答
  •  猫巷女王i
    2020-12-24 02:54

    You can use ng-click to call a function in your JS. In that function, use the event's preventDefault method, and use $location's hash method to change the hash in your URL.

提交回复
热议问题