WARNING: Tried to load angular more than once. Angular JS

后端 未结 23 1461
有刺的猬
有刺的猬 2020-12-01 13:57

I am trying to view my app after running Grunt Build. I use grunt serve:dist to see all production ready build but in the browser I get an infinite loop saying:

23条回答
  •  失恋的感觉
    2020-12-01 14:27

    The problem is in fact related to angular library being loaded too many times.

    My reply can sound too obvious, but the code itself is fine and there's not much information on what the problem can be. If you can post your folder tree, maybe it can be useful.

    In the meantime, please ensure these two things are ok before investigating further:

    • views/posts.html does not include a script tag with the call to angular.js library.
    • views/posts.html file is available in that position (maybe use a complete URI).

提交回复
热议问题