Home  >  Q&A  >  body text

angular.js - angular + require + angular-ui-router 报了如下的错。

走投无路,求帮助,谢谢了~!

Could not resolve 'employeeDatail' from state 'employee'
PHP中文网PHP中文网2713 days ago518

reply all(4)I'll reply

  • 天蓬老师

    天蓬老师2017-05-15 17:07:44

    If you use require, is employeeDatail loaded asynchronously? If so, check whether the module corresponding to employeeDataild has been loaded when employee's state is triggered.

    reply
    0
  • 伊谢尔伦

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

    I think it’s a routing problem, is your ui-sref link correct

    Post the code

    Do you want to do modular on-demand loading? If so, it is recommended to use angularAMD

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-15 17:07:44

    There is a problem with routing, your ui-sref does not match

    reply
    0
  • PHP中文网

    PHP中文网2017-05-15 17:07:44

    The poster can refer to a demo I wrote before, just to test angular-ui-router. The address is:
    https://github.com/silence717...

    reply
    0
  • Cancelreply