Introduction To AngularJS With Logo
Introduction To AngularJS With Logo
Agenda
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Prerequisites
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
HTML
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is HTML?
● Stands for HyperText Markup Language
● HTML defines how the web page looks and how to display content with the help
of elements
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
HTML Skeleton
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
CSS
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is CSS?
● Stands for Cascading Style Sheet.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
CSS Syntax
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
selector1{
property1:value;
property2:value;
}
selector2{
property1:value;
}
</style>
</head>
<body>
</body>
</html>
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Adds Behaviour/Interactivity to the
webpage
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is JS?
● Stands for JavaScript.
● It is a verb of the webpage that defines all the actions to be performed on a webpage.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
JS Syntax
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
…..
…..
<script>
document.write(“Hello World”);
console.log(“Great Learning”);
</script>
</body>
</html>
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What are SPA’s?
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What are SPAs?
Single request sent to Server to load the whole
application
Multiple data Requests going to the server, not page.
Client page doesn’t get load again and again.
Request for an item in search box
Request for Data
Request for Page X
Request for www.amazon.com Request for www.gmail.com
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Introduction to
AngularJS
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Why AngularJS?
Is JS ideal for SPAs? - “No, only JS is not ideal for SPAs. We have variety of Frameworks and Libraries
instead which will make it possible for JS to create SPAs”
What is a Framework?
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
What is AngularJS?
It is completely written in
Maintained by Google
Typescript
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Features of AngularJS
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Speed and
Data Binding Performance
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
MVC Architecture
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Ingredients:
Milk
Tea Leaves
Water
Sugar
Cardamom
Chef Customer
Waiter
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
DATA
Model View
Controller
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Versions and Transition
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Angular JS/Angular 1.X Angular 4 – Reduce the Angular 7 – Prompts Angular 9 – This came
– aimed to simplify both size of the code for the were introduced which with new and improved
the development and components with faster provide tips in CLI. It Ivy compiler and
the testing phase of compilation, better bug help discover inbuilt runtime, faster testing,
applications. fixes alert. SCSS support, routing. better debugging.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Environmental setup
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Installing Angular
1) Install node.js and npm - https://nodejs.org/en/
Verify that you are running at least Node.js version 13.x or greater and npm version 5.x or greater
by running node -v and npm -v in a terminal/console window. Newer versions are fine.
Why node js ?
Node js
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
AngularJS IDEs
● Web storm
● Atom
● Sublime
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Web storm
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Atom
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Sublime Text
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Visual studio code
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Introduction to
Visual studio code
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Angular App Fundamentals
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Create Angular App
Once angular-cli is installed, create a new app
Once the application is created, go to the application folder and run command - ng serve to serve the
application.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Angular Project Structure
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
How Angular App Starts?
Main.ts file is entry point of our application.
main.ts Main.ts file bootstrap app.module.ts file
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Bootstraping the AppModule
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Bootstraping the AppComponent
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Simple AngularJS App
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Companies using AngularJS
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Flipkart YouTube
Gmail Nike
UpWork SONY
PayPal HBO
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Advantages of AngularJS
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Advantages of AngularJS
• Two-way binding – we used to write extra JS code to keep the data in HTML code and data later in sync.
Now, Angular will do this automatically
• Routing – Moving from one view to another is pretty easy here as it will be a SPA.
• Directives – It provides its own libraries and directives which makes it more easy to use and code.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Thank You
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited