Angular 7 CLI
The Angular framework is constantly evolving and improving fantastically. It has to do with the quick changes in front-end technology, cloud computing, browsers, demand for enterprise solutions, artificial intelligent, faster new Angular engine (IVY engine) and many more.
The Angular 7 is faster than previous versions and upgrading is nicely done. Since new framework is faster than before, you can expect a much better performance.
The new Angular CLI is awesome and it responds with prompts. The new CLI prompts to choose between SCSS, CSS, SASS and more. It is very well customizable and just add the schematic.json and Angular CLI assist you as which prompts to choose from!
The new Angular provides a better the production build and removes the polyfill when there is not any reference to it. Also, a warning message is displayed when the app is more than 2 MB and of course screams errors when the app is getting bigger in MB! That means it is possible to modify the angular.json file and include the following
Now another nice cool feature, browser compatibility. The Angular CLI ensures compatibility with various and different web bowsers. It is possible to include or exclude specific web browsers versions from the app build. This can be done with “Autoprefixer “. This tool adds the bowser’s list property to the package configuration file, which it is in package.json. The other choice is to add the “.browserslistrc” to the app’s project folder.
There are several more improvements in Angular and I like the proxy server setup in webpack too. This is done by passing a file to “–proxy-config” in the build option. It is very simple and diverting all http calls from http://IPaddress:3000/api to http://IPaddress:8080/api , placing the “proxy.conf.json” in the src/folder of project :
Now, add the “proxyConfig” option inside angular.json file in the server section:
This configuration takes effects by calling “ng serve”.
Angular CLI is powerful and makes front end development easier in various ways. I suggest working with various compilations with ng build tool to see what works better in your development environment.
Nice! Did you know Angular CLI was based off of Ember CLI? #EmberJS #EmberJS2019