Wednesday, January 2, 2019

Learn Angular 7 from Scratch

What is Angular And Why?

Angular is a framework to build client-side applications. it is great for Single page applications (SPA) developed by Google. it provides built-in features like services, HTTP services, Materials etc.

1. Coming to History :
 it was released in 2010 --> Angular JS
                             2016  --> Angular 2
                             2016  -->  Angular  4 (December)
                             2017  --> Angular   5 (November )
                             2018   --> Angular 6 (May)
                             2018  --> Angular 7 (Oct)

About This Course ?
It is a crash course for all beginners from scratch. before going to this course. the prerequisites are HTML, CSS, Basics of Type Script, Java Scripts and Bootstrap.

2. Environment Setup
  1. Node
  2. Npm
  3. Angular CLI
  4. Text Editor to develop the code (Visual Studio Code (VS Code))
 Node :
 Install the Node JS. go to website select required OS and install it.   https://nodejs.org/en/download/

 Check the Node JS Version :
  go to command prompt and type as node -v like below
       
                                            [ C: \ > node -v ]
Npm :
Npm installed automatically while install Node JS. to check the Npm then go to command prompt and type npm -v as below
                                           [ C: \ > npm -v ]
Angular CLI :
Now to go https://cli.angular.io/ copy the command as shown below and execute it

                                          [npm install -g @angular/cli ]
                                           [ ng -v]  to check version   
Visual studio Code :
 go to visual studio website and download it.  (https://code.visualstudio.com/).


3. Create a Angular Project :

 method 1: Go to command prompt type as below
                                         [ ng new helloworld]
                                          [ cd helloworld]
                                          [ ng serve] 
method 2 : Go to View in VS code create a Folder and name it as Angular click on Folder--> Now go to Integrated Terminal
                          type as   [ ng new helloworld]
                                         [ cd helloworld]
                                         [ ng serve] 
All installation and creating project is completed now run the angular application in browser.
Now go to Browser and type localhost:4200
angular app is running in browser.

4. Architecture of Angular

Angular contains the one or more modules. every module contains the one or more components or services. components is nothing but HTML template + Class to control the business logic for render the particular View.
Coming to the services. if you want to re-use the code in different components then services are the best concept. here you can write the business logic for your application.








Coming soooooooooooooooooooooooooooonnnnnnnnnnnn