search

Home  >  Q&A  >  body text

angular.js - angularjs gives html an ID when switching routes

I just came into contact with angularjs
Is there any way to add an id or some unique identifier to the html tag when switching routes?

高洛峰高洛峰2867 days ago599

reply all(1)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-15 17:01:44

    You can use the $locationChangeSuccess event in the $location service. You can do whatever needs to be done in the callback function.

    reply
    0
  • Cancelreply