search

Home  >  Q&A  >  body text

angular.js - Why can't the additional parameters in angular route jump be successful?

        <li ui-sref="app.admin.edit({$rootScope.adminUser._id})">
                <a>
                    改密
                </a>
            </li>
        想要在这个状态后面附上一个参数,这个值是存在而且在conlose.log中可以打出来的,但是跳转的时候没有附上这个ID,这是为什么呢?
巴扎黑巴扎黑2841 days ago507

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-05-15 17:02:34

    Remove $rootscope

    reply
    0
  • 黄舟

    黄舟2017-05-15 17:02:34

    Remove $rootScope or $rootScope.adminUser. Normally, just pass an object and get the id on the next page.

    reply
    0
  • Cancelreply