SlideShare a Scribd company logo
Introduction to angular js  for .net developers
Introduction To
AngularJS
For .Net Developers
Mohd Manzoor Ahmed [MCT]
manzoor_trainer manzoorthetrainer.com
Get The Complete Video Course
Here (https://goo.gl/ZBHEBe)
Thanks
Today’s Agenda
10:00 AM - 11:15 AM
Welcome Note
Introduction To SPA
Getting Started With AngularJS
Directives, Module and Controller
11:45 AM - 01:30PM
$scope Object
Server Calls Using $http
Filters
Conclusion
11:15 AM - 11:45 AM
Virtus IT
Break
Why Asp.Net SPA?
SPA stands for Single Page Application.
We need user experience similar to a desktop application.
We need to speed up the page loads and navigation for the user.
In short we need responsive Web apps, without constant page reloads.
What is Asp.Net SPA?
Get all necessary code – HTML, JavaScript, and CSS on the initial page load.
Download appropriate features dynamically from server behind the scenes on
response to a user action.
Without reloading the complete page.
One of the best examples of SPA is Gmail.
Client Server
Page Life Cycle - Normal?
Initial Request
HTML Response
Post Back
HTML Response
Get Initial Data
Reloads the page
and
Get More Data
Client Server
Page Life Cycle SPA?
Initial Request
HTML Response
Post Back
HTML Response
Get Initial Data
Updates the page
and
Get More Data
How To Achieve SPA?
It can be achieved with help of Web browser JavaScript frameworks, such as
AngularJS, knockout.js, Ember.js, ExtJS, React, etc
Why AngularJS?
We need a javascript framework that supports Single Page Applications.
We need simple bidirectional data binding.
We need simple client side development and testing process.
We need a framework that support MV*
We need a framework that keeps HTML and JavaScript saperatly.
Get The Complete Video Course Here
What is AngularJS?
AngularJS is a javascript based open-source web application framework mainly
maintained by Google.
Its aims is to simplify both the development and the testing of client-side model–
view–controller (MVC) and model–view–viewmodel (MVVM) architectures.
(MV*).
AngularJS version 1.0 was released in 2012.
Getting Started With AngularJS
1. Start an empty web application.
2. Add AngularJS core using nuget package manager.
3. Add angularjs script file to index.html.
4. Use an expression {{...}}.
5. Using ng-app directive.
Demo
Let’s See First AngularJS App Demo
Directives - Mostly Used
In Short! These are special attributes for HTML
elements.
ng-app
ng-bind
ng-init
ng-show
ng-hide
ng-true-value
ng-options
ng-repeat
ng-click
ng-model
ng-if
ng-controller
For More : https://docs.angularjs.org/api/ng#directive
Demo
Let’s See a Directives Demo
Get The Complete Video Course Here
Module
Our application is logically divided into multiple units called as Modules.
Module is a collection of controllers and many other parts of application.
<script type=”text/javascript”>
var app = angular.module('myApp', []);
</script>
View is mapped to the module using ng-app directive.
Assigning Module To The View
<html ng-app=”myApp”>
<head> </head>
<body>
<div>
</div>
</body>
</html>
Controller
In Short! Controller is a javascript function, used to prepare data (Models) to be
rendered on html pages (View).
<script>
var app = angular.module('myApp', []);
app.controller('employeeController', function ($scope) {
…………………………….
});
</script>
View is mapped to the controller using ng-controller directive.
Assigning Controller To The View
<html ng-app=”myApp”>
<head> </head>
<body>
<div ng-controller=”employeeController”>
</div>
</body>
</html>
AngularJS $scope
$scope is an object which holds the data (Model) and is used to bind data between
html pages (View) and controller.
<script>
var app = angular.module('myApp', []);
app.controller('employeeController', function ($scope) {
$scope.myValue=”Hello MTT”;
});
</script>
Assigning Model To The View
<html ng-app=”myApp”>
<head> </head>
<body>
<div ng-controller=”employeeController”>
<input type=’text’ ng-model=’myValue’/>
</div>
</body>
</html>
Demo
Let’s See a Controller’s Demo
Controller’s Methods
<script>
var app = angular.module('myApp', []);
app.controller('employeeController', function ($scope) {
$scope.myValue=”Hello MTT”;
$scope.myFun=function() { alert (“From Method Call”); };
});
</script>
Calling Method From View
<html ng-app=”myApp”>
<head> </head>
<body>
<div ng-controller=”employeeController”>
{{myFun()}}
<input type=’button’ value=’Click Me!’ ng-click=’myFun()’/>
</div>
</body>
Get The Complete Video Course Here
Demo
Let’s See a Controller’s Method Demo
Controller’s Parameterized Methods
<script>
var app = angular.module('myApp', []);
app.controller('employeeController', function ($scope) {
$scope.myValue=”Hello MTT”;
$scope.myFun=function(id) { alert (“From Method Call”+id); };
});
</script>
Calling Method From View
<html ng-app=”myApp”>
<head> </head>
<body>
<div ng-controller=”employeeController”>
{{myFun(5)}}
<input type=’text’ ng-model=’myValue’/>
<input type=’button’ value=’Click Me!’ ng-click=’myFun(myValue)’/>
</div>
</body>
</html>
Demo
Let’s See a Controller’s Method With Param Demo
Making Asp.Net MVC Server Calls Using $http
$http is one of the service provided by AngularJS. It is used to make jQuery based
Ajax calls to the server.
app.controller('employeeController', function ($scope,$http) {
$scope.myValue=””;
$scope.myFun=function() {
$http.get("/Home/GetData/")
.then(function (response) {
$scope.myValue = response.data;
})
.error(function (response) {
$scope.myValue = “Error”+response.data;
});
};
Demo
Let’s see Server Call demo
Filters - Basic
Filters are special functions to format or transform the data using pipe character in an
expression followed by a filter. {{ model | filter }}
lowercase Format a string to lower case.
uppercase Format a string to upper case.
currency Format a number to a currency format.
number Format a number to a string.
date Format a date to a specified format.
Filters - Searching, Sorting And Paging
filter Select a subset of items from an array. - Searching
orderBy Orders an array by an expression. - Sorting
Third party dirPaginate.js - Pagination
Note: For more on pagination https://github.com/michaelbromley/angularUtils
Demo
Let’s see filters demo
Thanks
Get The Complete Video Course Here

More Related Content

What's hot (20)

Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP Developers
Edureka!
 
Angular js
Angular jsAngular js
Angular js
Knoldus Inc.
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
Kodexhub
 
ASP.NET MVC 3
ASP.NET MVC 3ASP.NET MVC 3
ASP.NET MVC 3
Buu Nguyen
 
AngularJS
AngularJSAngularJS
AngularJS
Maurice De Beijer [MVP]
 
AngularJS - introduction & how it works?
AngularJS - introduction & how it works?AngularJS - introduction & how it works?
AngularJS - introduction & how it works?
Alexe Bogdan
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
Christian Lilley
 
ASP .net MVC
ASP .net MVCASP .net MVC
ASP .net MVC
Divya Sharma
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
David Parsons
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 day
Quach Long
 
Angular 2 binding
Angular 2  bindingAngular 2  binding
Angular 2 binding
Nathan Krasney
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
rudib
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Digamber Singh
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
Edureka!
 
AngularJS
AngularJSAngularJS
AngularJS
Hiten Pratap Singh
 
ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines  ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines
Dev Raj Gautam
 
ASP.NET MVC for Begineers
ASP.NET MVC for BegineersASP.NET MVC for Begineers
ASP.NET MVC for Begineers
Shravan Kumar Kasagoni
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
Sergio Nakamura
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
Caleb Jenkins
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
Amit Baghel
 
Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP Developers
Edureka!
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
Kodexhub
 
AngularJS - introduction & how it works?
AngularJS - introduction & how it works?AngularJS - introduction & how it works?
AngularJS - introduction & how it works?
Alexe Bogdan
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
David Parsons
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 day
Quach Long
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
rudib
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Digamber Singh
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
Edureka!
 
ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines  ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines
Dev Raj Gautam
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
Sergio Nakamura
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
Caleb Jenkins
 

Viewers also liked (11)

C# simplified
C#  simplifiedC#  simplified
C# simplified
Mohd Manzoor Ahmed
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Hossein Zahed
 
ASP.NET 02 - How ASP.NET Works
ASP.NET 02 - How ASP.NET WorksASP.NET 02 - How ASP.NET Works
ASP.NET 02 - How ASP.NET Works
Randy Connolly
 
ASP.NET 12 - State Management
ASP.NET 12 - State ManagementASP.NET 12 - State Management
ASP.NET 12 - State Management
Randy Connolly
 
Big Data World
Big Data WorldBig Data World
Big Data World
Hossein Zahed
 
Basic c++ programs
Basic c++ programsBasic c++ programs
Basic c++ programs
harman kaur
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
Rishi Kothari
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
Mohamed Loey
 
2008: Web Application Security Tutorial
2008: Web Application Security Tutorial2008: Web Application Security Tutorial
2008: Web Application Security Tutorial
Neil Matatall
 
01 c++ Intro.ppt
01 c++ Intro.ppt01 c++ Intro.ppt
01 c++ Intro.ppt
Tareq Hasan
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
Ahmad Idrees
 
ASP.NET 02 - How ASP.NET Works
ASP.NET 02 - How ASP.NET WorksASP.NET 02 - How ASP.NET Works
ASP.NET 02 - How ASP.NET Works
Randy Connolly
 
ASP.NET 12 - State Management
ASP.NET 12 - State ManagementASP.NET 12 - State Management
ASP.NET 12 - State Management
Randy Connolly
 
Basic c++ programs
Basic c++ programsBasic c++ programs
Basic c++ programs
harman kaur
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
Rishi Kothari
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
Mohamed Loey
 
2008: Web Application Security Tutorial
2008: Web Application Security Tutorial2008: Web Application Security Tutorial
2008: Web Application Security Tutorial
Neil Matatall
 
01 c++ Intro.ppt
01 c++ Intro.ppt01 c++ Intro.ppt
01 c++ Intro.ppt
Tareq Hasan
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
Ahmad Idrees
 
Ad

Similar to Introduction to angular js for .net developers (20)

Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
Yashobanta Bai
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
SolTech, Inc.
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
Visual Engineering
 
Exploring AngularJS - Liju Pillai
Exploring AngularJS - Liju PillaiExploring AngularJS - Liju Pillai
Exploring AngularJS - Liju Pillai
Liju Pillai
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
Mahima Radhakrishnan
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
dizabl
 
Basics of AngularJS
Basics of AngularJSBasics of AngularJS
Basics of AngularJS
Filip Janevski
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Shyjal Raazi
 
AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
Maurice De Beijer [MVP]
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
Senthil Kumar
 
Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
murtazahaveliwala
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Getting Started With AngularJS
Getting Started With AngularJSGetting Started With AngularJS
Getting Started With AngularJS
Edureka!
 
Getting Started with AngularJS
Getting Started with AngularJSGetting Started with AngularJS
Getting Started with AngularJS
Edureka!
 
An introduction to AngularJS
An introduction to AngularJSAn introduction to AngularJS
An introduction to AngularJS
Yogesh singh
 
Intro to AngularJS
Intro to AngularJS Intro to AngularJS
Intro to AngularJS
Sparkhound Inc.
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
Nitin Giri
 
Angular js
Angular jsAngular js
Angular js
Hritesh Saha
 
Angular Presentation
Angular PresentationAngular Presentation
Angular Presentation
Adam Moore
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
Yashobanta Bai
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
Visual Engineering
 
Exploring AngularJS - Liju Pillai
Exploring AngularJS - Liju PillaiExploring AngularJS - Liju Pillai
Exploring AngularJS - Liju Pillai
Liju Pillai
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
dizabl
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Shyjal Raazi
 
AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
Maurice De Beijer [MVP]
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
Senthil Kumar
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Getting Started With AngularJS
Getting Started With AngularJSGetting Started With AngularJS
Getting Started With AngularJS
Edureka!
 
Getting Started with AngularJS
Getting Started with AngularJSGetting Started with AngularJS
Getting Started with AngularJS
Edureka!
 
An introduction to AngularJS
An introduction to AngularJSAn introduction to AngularJS
An introduction to AngularJS
Yogesh singh
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
Nitin Giri
 
Angular Presentation
Angular PresentationAngular Presentation
Angular Presentation
Adam Moore
 
Ad

Recently uploaded (20)

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdfCrypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Secure Access with Azure Active Directory
Secure Access with Azure Active DirectorySecure Access with Azure Active Directory
Secure Access with Azure Active Directory
VICTOR MAESTRE RAMIREZ
 
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
 
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
Cisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdfCisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdf
superdpz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdfCrypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Secure Access with Azure Active Directory
Secure Access with Azure Active DirectorySecure Access with Azure Active Directory
Secure Access with Azure Active Directory
VICTOR MAESTRE RAMIREZ
 
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
 
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdfHow Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
How Advanced Environmental Detection Is Revolutionizing Oil & Gas Safety.pdf
Rejig Digital
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
Cisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdfCisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdf
superdpz
 

Introduction to angular js for .net developers

  • 2. Introduction To AngularJS For .Net Developers Mohd Manzoor Ahmed [MCT] manzoor_trainer manzoorthetrainer.com
  • 3. Get The Complete Video Course Here (https://goo.gl/ZBHEBe)
  • 5. Today’s Agenda 10:00 AM - 11:15 AM Welcome Note Introduction To SPA Getting Started With AngularJS Directives, Module and Controller 11:45 AM - 01:30PM $scope Object Server Calls Using $http Filters Conclusion 11:15 AM - 11:45 AM Virtus IT Break
  • 6. Why Asp.Net SPA? SPA stands for Single Page Application. We need user experience similar to a desktop application. We need to speed up the page loads and navigation for the user. In short we need responsive Web apps, without constant page reloads.
  • 7. What is Asp.Net SPA? Get all necessary code – HTML, JavaScript, and CSS on the initial page load. Download appropriate features dynamically from server behind the scenes on response to a user action. Without reloading the complete page. One of the best examples of SPA is Gmail.
  • 8. Client Server Page Life Cycle - Normal? Initial Request HTML Response Post Back HTML Response Get Initial Data Reloads the page and Get More Data
  • 9. Client Server Page Life Cycle SPA? Initial Request HTML Response Post Back HTML Response Get Initial Data Updates the page and Get More Data
  • 10. How To Achieve SPA? It can be achieved with help of Web browser JavaScript frameworks, such as AngularJS, knockout.js, Ember.js, ExtJS, React, etc
  • 11. Why AngularJS? We need a javascript framework that supports Single Page Applications. We need simple bidirectional data binding. We need simple client side development and testing process. We need a framework that support MV* We need a framework that keeps HTML and JavaScript saperatly.
  • 12. Get The Complete Video Course Here
  • 13. What is AngularJS? AngularJS is a javascript based open-source web application framework mainly maintained by Google. Its aims is to simplify both the development and the testing of client-side model– view–controller (MVC) and model–view–viewmodel (MVVM) architectures. (MV*). AngularJS version 1.0 was released in 2012.
  • 14. Getting Started With AngularJS 1. Start an empty web application. 2. Add AngularJS core using nuget package manager. 3. Add angularjs script file to index.html. 4. Use an expression {{...}}. 5. Using ng-app directive.
  • 15. Demo Let’s See First AngularJS App Demo
  • 16. Directives - Mostly Used In Short! These are special attributes for HTML elements. ng-app ng-bind ng-init ng-show ng-hide ng-true-value ng-options ng-repeat ng-click ng-model ng-if ng-controller For More : https://docs.angularjs.org/api/ng#directive
  • 17. Demo Let’s See a Directives Demo
  • 18. Get The Complete Video Course Here
  • 19. Module Our application is logically divided into multiple units called as Modules. Module is a collection of controllers and many other parts of application. <script type=”text/javascript”> var app = angular.module('myApp', []); </script> View is mapped to the module using ng-app directive.
  • 20. Assigning Module To The View <html ng-app=”myApp”> <head> </head> <body> <div> </div> </body> </html>
  • 21. Controller In Short! Controller is a javascript function, used to prepare data (Models) to be rendered on html pages (View). <script> var app = angular.module('myApp', []); app.controller('employeeController', function ($scope) { ……………………………. }); </script> View is mapped to the controller using ng-controller directive.
  • 22. Assigning Controller To The View <html ng-app=”myApp”> <head> </head> <body> <div ng-controller=”employeeController”> </div> </body> </html>
  • 23. AngularJS $scope $scope is an object which holds the data (Model) and is used to bind data between html pages (View) and controller. <script> var app = angular.module('myApp', []); app.controller('employeeController', function ($scope) { $scope.myValue=”Hello MTT”; }); </script>
  • 24. Assigning Model To The View <html ng-app=”myApp”> <head> </head> <body> <div ng-controller=”employeeController”> <input type=’text’ ng-model=’myValue’/> </div> </body> </html>
  • 25. Demo Let’s See a Controller’s Demo
  • 26. Controller’s Methods <script> var app = angular.module('myApp', []); app.controller('employeeController', function ($scope) { $scope.myValue=”Hello MTT”; $scope.myFun=function() { alert (“From Method Call”); }; }); </script>
  • 27. Calling Method From View <html ng-app=”myApp”> <head> </head> <body> <div ng-controller=”employeeController”> {{myFun()}} <input type=’button’ value=’Click Me!’ ng-click=’myFun()’/> </div> </body>
  • 28. Get The Complete Video Course Here
  • 29. Demo Let’s See a Controller’s Method Demo
  • 30. Controller’s Parameterized Methods <script> var app = angular.module('myApp', []); app.controller('employeeController', function ($scope) { $scope.myValue=”Hello MTT”; $scope.myFun=function(id) { alert (“From Method Call”+id); }; }); </script>
  • 31. Calling Method From View <html ng-app=”myApp”> <head> </head> <body> <div ng-controller=”employeeController”> {{myFun(5)}} <input type=’text’ ng-model=’myValue’/> <input type=’button’ value=’Click Me!’ ng-click=’myFun(myValue)’/> </div> </body> </html>
  • 32. Demo Let’s See a Controller’s Method With Param Demo
  • 33. Making Asp.Net MVC Server Calls Using $http $http is one of the service provided by AngularJS. It is used to make jQuery based Ajax calls to the server. app.controller('employeeController', function ($scope,$http) { $scope.myValue=””; $scope.myFun=function() { $http.get("/Home/GetData/") .then(function (response) { $scope.myValue = response.data; }) .error(function (response) { $scope.myValue = “Error”+response.data; }); };
  • 35. Filters - Basic Filters are special functions to format or transform the data using pipe character in an expression followed by a filter. {{ model | filter }} lowercase Format a string to lower case. uppercase Format a string to upper case. currency Format a number to a currency format. number Format a number to a string. date Format a date to a specified format.
  • 36. Filters - Searching, Sorting And Paging filter Select a subset of items from an array. - Searching orderBy Orders an array by an expression. - Sorting Third party dirPaginate.js - Pagination Note: For more on pagination https://github.com/michaelbromley/angularUtils
  • 39. Get The Complete Video Course Here