Crash when use ngRoute angular


I wanna build SPA with angular , but I’m have this problem with it . Here is my code . In main page i’m using ng-include to navbar html:

   <div ng-include="'/project/app/client/shop/shop-header/shop-header.html'"></div>
 <div ng-view></div>

In my header page :

<li><a data-ng-href="/" class="btn btn-default" >
       <span style="color: #C62828">Shop</span>
 <li >
     <a data-ng-href="/cart" class="btn btn-default" >Cart</a>

js file


            configRoute.$inject= ['$routeProvider'];

            function configRoute($routeProvider){
                    .otherwise({ redirectTo: '/' });        

but when i run main page , console log warning : try to run angular 239 times and crash. Pls help me


You will see that warning whenever your code has loaded more than one angular.js files, just put one and remove all the other angular.js files in your HTML , your problem will be solved

Answered By – Pramod_Para

Answer Checked By – Mildred Charles (AngularFixing Admin)

Leave a Reply

Your email address will not be published.