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

后端 未结 23 1476
有刺的猬
有刺的猬 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:05

    This problem also is caused by using the current page as the templateUrl. This is especially problematic as it results in an infinite loop referencing itself over and over.

    If you are getting an infinite loop that crashes your page, it's probably this. If you are getting CORS errors, it's probably due to including a script tag from another domain in your template.

    $routeProvider.when('/', {
       templateUrl: 'an/absolute/url/to/the/current/page.html'
    });
    

提交回复
热议问题