Forum Discussion
I'm not familar with Angular, but while looking at the examples shown here https://www.w3schools.com/angular/angular_application.asp, and https://www.w3schools.com/angular/tryit.asp?filename=try_ng_app3. It seems like it's not possible to get the data of $scope.products, as this is contained within the angular module. I even tried in Chrome Dev Tools.
What if you try
pageObj.contentDocument.Script.
followed by the module name and then the function or variable name?
Hello rraghvani,
thank you very much for your effort.
Unfortunatelly, the modules defined i.e. loaded in the app have names that are not allowed as identifier in javascript, i.e. something like main.308a3c81de0bcf749. Using eval with double quotes fails too. Here my trys:
var mainMod00 = pageObj.contentDocument.Script.eval("main.308a3c81de0bcf749");
var mainMod01 = pageObj.contentDocument.Script.eval("'main.308a3c81de0bcf749'");
var mainMod10 = pageObj.contentDocument.Script.eval("eval('main.308a3c81de0bcf749')");
var mainMod11 = pageObj.contentDocument.Script.eval("eval(main.308a3c81de0bcf749)");
All the mainMod* vars are undefined (no allShapes at undefined).
Really weird things, like the following:
// Try to load it directly:
pageObj.contentDocument.Script.eval("import { mymod } from 'main.308a3c81de0bcf749';");// ?!?
var shapesReloaded0 = pageObj.contentDocument.Script.mymod.allShapes;
var mainmod = pageObj.contentDocument.Script.eval("await import('main.308a3c81de0bcf749');");
var shapesReloaded1 = mainmod.allShapes;
unfortunately do not work either.
Any other ideas?
Thank you very much.
Related Content
- 8 years ago
- 8 years ago
- 10 years ago
- 12 years ago
Recent Discussions
- 10 hours ago