search

Home  >  Q&A  >  body text

angular.js - Can ui-router share a controller and view template with multiple states?

For example, if there is a list on the left, when I switch the list items, I switch the content on the right, and the content on the right has the same format.
I know that ng-router can use list/:type to implement multiple routes matching one controller and view
So I would like to ask if UI-router can achieve this effect if the content only uses one controller

我想大声告诉你我想大声告诉你2785 days ago665

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-05-15 17:16:08

    This problem was solved by ui-sref="statu({key-value pair parameters})"

    reply
    0
  • 迷茫

    迷茫2017-05-15 17:16:08

    Yes, when you configure routing, just use the same template and controller for different states

    reply
    0
  • Cancelreply