Setting up environment for Angular 6

1. Check if you have npm installed by opening command and type npm -v. If you have not installed npm download it from - https://nodejs.org/en/
2. Install @angular-cli. Type npm install -g @angular/cli. -g parameter means that package will be installed globally so you can access angular cli functionality from any location.
Visit -  https://cli.angular.io/ for more info. This will enable you to create new angular project with some basic data that follows good practices.
3.  Next create new angular project. Type ng new ng-project where ng-project is name of new project you want to create. Make sure that in command line you are in folder where you want this project to appear. You can also use optional parameters like --routing or --style=scss (will use scss by default instead of css)
4. Now you open source code by typing code  (make sure you type .) in command line if you have Visual Studio Code installed (https://code.visualstudio.com/) - highly recommended
5. To run app you just create type ng -serve -o to initiate localhost server and open app in a browser. If you see error message "The serve command requires to be run in an Angular project, but a project definition could not be found" make sure you are in your angular project main folder. 


Comments

  1. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    JavaScript Training in Chennai

    JavaScript Training in Chennai

    ReplyDelete

Post a Comment