Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide Angularjs source codes?

How to hide app.js, controller.js files or code?

They are visible in html source. Is there anyway to hide them?

like image 940
OMahoooo Avatar asked Oct 20 '13 09:10

OMahoooo


People also ask

How do you show ng-hide?

The ngHide directive shows or hides the given HTML element based on the expression provided to the ngHide attribute. The element is shown or hidden by removing or adding the . ng-hide CSS class onto the element.

Which of the following codes will you use to hide a given control in AngularJS?

AngularJS ng-hide Directive The ng-hide directive hides the HTML element if the expression evaluates to true. ng-hide is also a predefined CSS class in AngularJS, and sets the element's display to none .


2 Answers

You cannot hide angualrjs. Its based on Javascript. To minify, doesn't help because anyone can convert it back to human readable view (sure if anyone wants to steal your code). Any sensitive logic try to put on server side.

Hope it will hep,

like image 154
Maxim Shoustin Avatar answered Oct 04 '22 07:10

Maxim Shoustin


  1. minify
  2. uglify along with minify you must uglify your code, which make it difficult to understand, it will renames the variables and function in very ugly manner, not easy to break the code.
    Also you can encrypt it well, you have and have to decrypt when it is needed to use, and that can't be remain hidden from the front end tools
like image 45
Ankit Balyan Avatar answered Oct 04 '22 06:10

Ankit Balyan