Shameem
Shameem

Reputation: 71

I get an error when i run my angular application on visual studio.

I created a to do list app using html, css and javascript. I'm trying to create the same app using javascript. The problem I'm facing is that I'm getting this error when I include angular in my application.

Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.

Upvotes: 1

Views: 835

Answers (1)

Karim
Karim

Reputation: 8632

this could be an IE bug, try bootstrapping your app manually instead of relying on the standard approach with the ng-app directive.

angular.element(document).ready(function () {  
 angular.bootstrap(document, ['nameOfYourApp']);
});

https://github.com/angular/angular.js/issues/15567

https://github.com/angular/angular.js/issues/15772

https://www.roelvanlisdonk.nl/2017/02/01/fix-in-ie-angular-1-6-1-disabling-automatic-bootstrap-script-protocol-indicates-an-extension-document-location-href-does-not-match/

Upvotes: 5

Related Questions