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.

  1. how can block users accessing scope variables?
  2. even if block, there way users may access scope variables?
  3. 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

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -