SlideShare a Scribd company logo
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

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 - 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
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
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
Amit Baghel
 

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
 
Angular js
Angular jsAngular js
Angular js
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
ASP.NET MVC 3
ASP.NET MVC 3ASP.NET MVC 3
ASP.NET MVC 3
 
AngularJS
AngularJSAngularJS
AngularJS
 
AngularJS - introduction & how it works?
AngularJS - introduction & how it works?AngularJS - introduction & how it works?
AngularJS - introduction & how it works?
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
 
ASP .net MVC
ASP .net MVCASP .net MVC
ASP .net MVC
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 day
 
Angular 2 binding
Angular 2  bindingAngular 2  binding
Angular 2 binding
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
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
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
 
AngularJS
AngularJSAngularJS
AngularJS
 
ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines  ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines
 
ASP.NET MVC for Begineers
ASP.NET MVC for BegineersASP.NET MVC for Begineers
ASP.NET MVC for Begineers
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
 
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
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
 

Viewers also liked

C# simplified
C#  simplifiedC#  simplified
C# simplified
Mohd Manzoor Ahmed
 
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.pptTareq Hasan
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
Ahmad Idrees
 

Viewers also liked (11)

C# simplified
C#  simplifiedC#  simplified
C# simplified
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
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
 
ASP.NET 12 - State Management
ASP.NET 12 - State ManagementASP.NET 12 - State Management
ASP.NET 12 - State Management
 
Big Data World
Big Data WorldBig Data World
Big Data World
 
Basic c++ programs
Basic c++ programsBasic c++ programs
Basic c++ programs
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
 
2008: Web Application Security Tutorial
2008: Web Application Security Tutorial2008: Web Application Security Tutorial
2008: Web Application Security Tutorial
 
01 c++ Intro.ppt
01 c++ Intro.ppt01 c++ Intro.ppt
01 c++ Intro.ppt
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 

Similar to Introduction to angular js for .net developers

Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
أحمد عبد الوهاب
 
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
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
Bipin
 
mean stack
mean stackmean stack
mean stack
michaelaaron25322
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
The Basics Angular JS
The Basics Angular JS The Basics Angular JS
The Basics Angular JS
OrisysIndia
 
Top 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers MakeTop 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers Make
Mark Meyer
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
Gaurav Agrawal
 
Angular js-crash-course
Angular js-crash-courseAngular js-crash-course
Angular js-crash-course
Keith Bloomfield
 
AgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllersAgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllers
jobinThomas54
 
Mean stack Magics
Mean stack MagicsMean stack Magics
Mean stack Magics
Aishura Aishu
 
introduction to Angularjs basics
introduction to Angularjs basicsintroduction to Angularjs basics
introduction to Angularjs basics
Ravindra K
 
AngularJS in 60ish Minutes
AngularJS in 60ish MinutesAngularJS in 60ish Minutes
AngularJS in 60ish Minutes
Dan Wahlin
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
SolTech, Inc.
 
AngularJS Framework
AngularJS FrameworkAngularJS Framework
AngularJS Framework
Barcamp Saigon
 
AangularJS Framework
AangularJS FrameworkAangularJS Framework
AangularJS Framework
CloudVis Technology
 
243329387 angular-docs
243329387 angular-docs243329387 angular-docs
243329387 angular-docs
Abhi166803
 

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

Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
 
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
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
 
mean stack
mean stackmean stack
mean stack
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
 
The Basics Angular JS
The Basics Angular JS The Basics Angular JS
The Basics Angular JS
 
Top 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers MakeTop 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers Make
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Angular js-crash-course
Angular js-crash-courseAngular js-crash-course
Angular js-crash-course
 
AgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllersAgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllers
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
 
Mean stack Magics
Mean stack MagicsMean stack Magics
Mean stack Magics
 
AngularJS
AngularJS AngularJS
AngularJS
 
introduction to Angularjs basics
introduction to Angularjs basicsintroduction to Angularjs basics
introduction to Angularjs basics
 
AngularJS in 60ish Minutes
AngularJS in 60ish MinutesAngularJS in 60ish Minutes
AngularJS in 60ish Minutes
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
 
AngularJS Framework
AngularJS FrameworkAngularJS Framework
AngularJS Framework
 
AngularJS Framework
AngularJS FrameworkAngularJS Framework
AngularJS Framework
 
AangularJS Framework
AangularJS FrameworkAangularJS Framework
AangularJS Framework
 
243329387 angular-docs
243329387 angular-docs243329387 angular-docs
243329387 angular-docs
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 

Introduction to angular js for .net developers

  • 1.
  • 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