Angular

Angular 

----------------------------------------------
Angular is a js framework that allows you to create reactive single-page-applications (SPAs).

Gives the user a very reactive user experience.User feels like a mobile 
application while using interms of reactive response.
If you need data from server , load it in the background so that user will experience the reactive way of use.

Every click i do in the page is loaded in the single page in the one html page only and how is it done ? java script
changes the DOM(Document Object Model),html during run time and you never see the refresh icon  in the top left because 
we only change the currently loaded page.

Angular versioning
----------------------------------------
AngularJS(Angular1)
|
|Complete rewriten
|
Angular 2
(Angular 3 Skipped)
|
|
Angular 4
.
.  new version every 6 months.
.
Angular 9

Angular CLI (Command Line Interface)
--------------------

CLI is the  recomended and best way of creating angular project.


Additional thing to use is node js.

We will not write any nodejs code here. but nodejs will be used behind the seen by the CLI to bundle And 
optimize our project and will use NPM (Node Package Manager) to merge different dependencies the angular project have.
Different dependencies are the angular project it self although some other libraries that the framework uses.

Can download the latest version of nodejs from the nodejs official site 
10.0.0 Current (Latest features) which will conveniently install nodejs and the npm tool in your machine.

Once this is finished , we will run some command in our command prompt or terminal.
Open as Administrator.

commands :
----------------------
> npm install -g @angular/click
>ng new my-dream-application
>cd my-dream-application
>ng serve 

in mac or linux use sudo...

hint :

ng new _  The angular CLI makes it easy to create an application that already works , right out of the box.
It already follows the best practices.

ng generate_ Generate components , routes , services , and pipes with a simple command.The CLI will also create
simple test shells for all of these.



1.Installing angular cli:
-----------------------------------
> npm install -g @angular/click

output 
------------------------------------
+  @angular/cli@6.0.0
updated 2 packages in 8.998s






2.creating project :
--------------------------------a
navigate to the location where you want to create the project using cd command.
then use the command ng new my-first-app(name of your application)

Would you like angular routing ? No

hit enter 2 times

.
.
Addedd 1146 packages 


3.Create a developement server that will run your built and optimized app
--------------------------------------------------------------------------000000000
cd my-first-app (name 00f your project)
>ng serve



The server runs on local host /4200  by default.
//localhost:4200

go to browser and enter //localhost:4200/0


file:///E:/angularProject/my-dream-app/src/app/app.component.html

go to project location -- src -- app -- app.component (.html)

Now the project will run in0 th0e browser.


Other commands
---------------------------
ng generate component xyz
ng add @angular/material
ng add _____
ng test
ng build --prod



Angular is developed by google which is based on a language "type script" developed by microsoft.Type script is the 
super set of java script.

Type script angular introduced an object oriented programming paradigm into web developement.

Angular follows modularity.Similar functionalities kept in the same module.

Components of angular is :

module, components, template, metadata, data binding , Directives , services and dependency injection


Angular doesnot have scope and controller instead it makes use of a hirarchy of components as it's main architectural concepts.


Angular has a simple expresiion of syntax focusing on 
1. square brackets for property binding and
2. regular paranthesys for event binding


Angular first handles mobile developement 

Angular follows modularity .
Similar functionalities are kept in a same module and it gives angular a lighter and faster call.

with type script angular has installed class based object oriented programming and static typing into website creation.


Compnies use angular are 
1.google
2.microsoft
3.samsung 
4.VMWare

Why angular is popular 
1.Easy to use
2.lesser code 
3.MVC architecture
(model -- base contain all the data , view -- what the user sees)
4.Angular works in client side which makes it compatible with both mobile and desktop application
5.Angular provides filters to filter different kinds of data such as numbers, lower case,and uper case letter etc.
6.We can also designs our own filter according to our requirement.
7.Angular allows two way data binding means if any changes are made to the models it's corresponding views will be 
updated accordingly and we can also updated the models through the views.
8.Developers can make use of different moduls to create single page of application.
9.Angular provides simple and easy testing as a result of module separation feature.
10.Angular is flexible and extensible.Angular is very accomodating when it comes to integrating with the existing
technology stack.

whats new in angular 8 -

1. require type script 3.4 for developement.
2.opt -in IV preview. (v4)
3.Differential loading -- as a part of it's build process ,angular 8 cli is able to produce both Lagasse and modern
javascript bundles i.e. es 5 or ecmascript 5 or es2015 plus. es2015 is nothing but ecmascript 6 this implies a differentially
loaded client side with improved speed and TDi

Comments

Popular posts from this blog

Git Commands With Output Log

Java Interview Preparation (conceptual)

Java 8 Function Interface