简体   繁体   中英

min.js* how does that work?

I'm new to this so hope you understand my question.

I'm working on AngularJS based app on visual studio. Whenever i modify something in my controller, seems like none of the changes are reflected when the app is run. I've noticed that same code is in project.min.js* with bunch of other code and whenever you modify that only then you can see the changes.

How does this work? If you make a change to your controller, do you repeat that change in project.js and project.min.js* or is there any more convenient way to update everything at once?

AngularJS minifies your source files. This creates a min.js-file for every conventional js file.

minifying is the process of removing any unneccesary information from your source code (like spaces, line breaks,...). It also shortens variable names and so on. This is done so that the resulting, minified script file consumes as few space as possible, which allows the web page to load faster (less network traffic).

Minifying should be done automatically, and there is no need to make your code changes multiple times. never. If that "automatic process" is not working for you, you should post a different question (something like AngularJS minification not working)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM