AngularJs scope variables in console -
i know can access scope variables using batarang (chrome extension), , angular.element(document.queryselector('selector')).scope()
i able access scope, controllers, in angular.io, angularjs.org
but came across angularjs website (www.paytm.com) able block me accessing scope variables in console, controller, etc.
- how can block users accessing scope variables?
- even if block, there way users may access scope variables?
- will have security if block users accessing scope data?
the site uses
$compileprovider.debuginfoenabled(false) which primary task to improve app performance.
though can (loosely) considered part of counter-measures against re, doubt problem programmer capable of reverse-engineering obfuscated app. if aren't keen on compromising codebase, don't use on client side.
even if block, there way users may access scope variables?
sure.
var scope; angular.element(document.body).injector().invoke(function ($rootscope) { scope = $rootscope; console.log(scope); }); or angular.reloadwithdebuginfo(), guide above suggests.
Comments
Post a Comment