search

Home  >  Q&A  >  body text

Errors when using ng-switch in angular.js

ng-switch corresponds to different interfaces based on different values, and then changes the interface by changing different values, and sets the routing at the same time, and then I change the value through a click event. Then when the value changed, the routing also changed, but the interface did not change. I clicked the button a second time to jump to that interface. I don’t know what happened. Is this a bug of ng-switch? Then the value did change, because I console.log it directly. Ask God to provide ideas. Do I need to refresh the interface when changing the value? So what are the methods to refresh the interface?

伊谢尔伦伊谢尔伦2817 days ago469

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-15 17:05:15

    Your click event is using js’s onclick, right? Change to ng-click

    reply
    0
  • Cancelreply