What is Angular
Angular is a platform and framework for building single-page client applications using HTML and TypeScript.
A single page application(SPA) is a web application or website that interacts with the web browser by dynamically rewriting the current web page with new data from the web server, instead of the default method of the browser loading entire new pages. The goal is faster transitions that make the website feel more like a native app.
It is a Client-Side Application
Angular is written in TypeScript. It implements core and optional functionality as a set of TypeScript libraries that you import into your apps.
Library: a certain function of an application
Framework: the skeleton of the application
Why do we use Angular
Modular Approach: each and everything with an angular work is divided into modules. So it is easy to maintain.
Reusable Code
Quick and easy to use
Easy for Unit Testing because it is in a modular approach
Supported by Google and Microsoft
Benefits of using Angular
Cross-Platform
Speed and Performance
Component-based architectue that provides a higher quality of code
TypeScript: better tooling, cleaner code, and higher scalability
RxJS: efficient, asynchronous programming
seamless updates using Angular CLI
Interpolation
Features of Angular
Component: There are building blocks of angular application to control HTML views
Modules: Set od angular basic building blocks like components, directives, services etc. An application is divided into logical pieces and each piece of code is called as "module" which perform a single task.
Directives
Templates: Represent the views of an angular application
Services: Used to create components which can be shared across the entire application.
Routing
Metadata: Used to add more data to the angular class.
Difference between angular and angular.js
Routing: Angular uses @RouteConfig angularjs uses $routeprovide.when()
AngularJS : MVC Architecture
Use JavaScript to build the application
Not a mobile friendly framework
Angular : Based on Service/Controller
Typescript
Componenet based UI approach
What is TypeScript?
Typed superset of JavaScript created by Microsoft that adds optional types, classes, async/await, and many other features, and complies to plain JavaScript
Can define custom data types and make it strictly typed language
0 Comments