search

Home  >  Q&A  >  body text

javascript - How to implement $state.go to click different buttons and pass different parameters

How to implement $state.go to click different buttons and pass different parameters

I want to realize that clicking on the small title in the picture below will jump to the corresponding place on the page, for example, click on the application scope to jump to the corresponding application scope on the 3D visualization solution page

Me Now I know that $state.go passes a parameter to jump to this specified position, but I don’t know how to write multiple parameters. Please help me.

某草草某草草2827 days ago649

reply all(3)I'll reply

  • 阿神

    阿神2017-05-19 10:11:23

    Grammar:

    $state.go(路由名,{name:'xxx',type:'home'})
    

    Routing configuration:

    .state(路由名, {
      url: '/xxx?name&home', //参数是name和home,可以选传
      templateUrl: 'xxx/xxx/xxx', //对应的页面路径
    })

    reply
    0
  • 怪我咯

    怪我咯2017-05-19 10:11:23


    The problem has been solved, thank you everyone, thank you upstairs

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-19 10:11:23

    You can check out this article about passing values ​​between pages in angular1.X

    reply
    0
  • Cancelreply