How to build an Angular 2+ Projects in seconds using Angular CLI

Angular 2+ is the great new framework that will provide us a great deal of flexibility and power when building our apps.

Goals

  • Build an Angular 2+ app in seconds
  • Create an Angular 2+ starter kit
  • Understand what goes into setting up Angular 2+

Set up the Development Environment

You need to set up your development environment before you can do anything.

Install Node.js® and npm if they are not already on your machine.

Verify that you are running at least node 6.9.x and npm 3.x.x by running node -v and npm -v in a terminal/console window. Older versions produce errors, but newer versions are fine.

Super Skip the Setup

Check out the Angular CLI.

You can get an Angular app up and running like this:

npm install -g angular-cli

ng new my-new-app

cd my-new-app

ng serve

View your app at http://localhost:4200.

If you use the CLI approach, then your entire app will live withing the /src folder that the CLI generates.

Conclusion

Thats it, you just build your first Angular 2+ app in seconds using Angular cli.

Happy coding!

Check our website: https://icto.network/