How to hide Angularjs source codes?

前端 未结 5 1051
有刺的猬
有刺的猬 2021-02-02 00:36

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

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

5条回答
  •  [愿得一人]
    2021-02-02 01:01

    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

提交回复
热议问题