I have encountered a peculiar situation that I have successfully dealt with before, but the correct syntax escapes my memory at the moment. Let's say I have an angularJS application named myAngularApp in the code. In the app.js file, it looks something like this:
angular.module('myAngularApp', [
'ngTouch',
'ui.bootstrap',
'ngAnimate'
])
After making some changes to scripts and HTML in Chrome Dev Tools, I now need to restart or reinitialize the angular code without refreshing the browser. Previously, I could accomplish this by typing something similar to this in the console...
angular.bootstrap('myAngularApp')
However, when I attempt this method again, I encounter an error message:
Uncaught TypeError: Cannot use 'in' operator to search for 'getAttribute' in myAngularApp
at new App (chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:967:25)
at Function.NGI.App.App.bootstrap (chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:1031:16)
at Object.window.angular.bootstrap (chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js:1512:12)
at <anonymous>:2:9
at Object.InjectedScript._evaluateOn (<anonymous>:895:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:828:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)
Now, I am uncertain if this issue is related to a chrome extension rather than the statement
angular.bootstrap('myAngularApp')
. Could someone clarify if using angular.bootstrap is indeed the correct approach to reboot or reinitialize an angular app in Chrome Dev Tools?