How to hide Angularjs source codes?

OMahoooo picture OMahoooo · Oct 20, 2013 · Viewed 38.7k times · Source

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

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

Answer

Deividi Cavarzan picture Deividi Cavarzan · Oct 20, 2013

This cannot be done.

But you can use tools for minify the sources. See Google Clousure and ng-min for angular.js

I recommend you to use grunt to build one single js file for you application, with all of your code minified. Take a look at those projects that may be useful: ng-boilerplate and yeoman - angularjs