angular.js - How does angularjs implement routing switching views through click events?
淡淡烟草味
淡淡烟草味 2017-05-15 16:57:13
0
2
551

The page uses angular routing to switch different page views. If you do not use the a tag to switch, use ng-click to trigger some method judgments first, and then start the routing to switch views. Is this possible? If so, how should I write the statement? I haven't found any reliable cases online, so I'd like to ask you to answer your questions.

淡淡烟草味
淡淡烟草味

reply all(2)
某草草

If you use ngRouter, use $location.path to switch.
If you use uiRouter, you can use state.go

I’m here for Amway uiRouter

洪涛

It is also possible to change the current loaction through ng-click

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template