SlideShare a Scribd company logo
1 of 16
INTRO TO ANGULARJS
Using a very simple Single Page Application
Ryan Richard
Ryan.Richard@Sparkhound.com
APP DEMO
AdventureWorks app demo.
Review AdventureWorks solution/project structure.
WHAT IS A SINGLE PAGE
APPLICATION?
Typically there is one web page that serves as the shell for the
application, and dynamic content is loaded into the shell as the
user navigates.
The app never navigates to another main web page – all
navigation is within the main page.
WHAT IS A SINGLE PAGE APPLICATION?
(CONT’D)
Heavy on scripting (typically JavaScript).
Most scripts are loaded when the app (i.e. the main page) launches (in
essence, building the app in the browser).
State can be maintained browser-side in the scripts, making the app
behave more like a desktop application.
Visible content (i.e. HTML templates) are fetched when needed, and
then typically cached for reuse.
Data is accessed asynchronously (HTTP requests).
WHAT IS ANGULARJS?
AngularJS is a JavaScript framework (made/backed by Google).
It does NOT require JQuery, but it can use it (because it is JavaScript).
You do NOT have to create a single page application (you can use it for
other things (e.g. binding, DOM manipulation, etc.).
Load the AngularJS framework file(s) and your AngularJS module file(s)
just like normal scripts from a designated web page.
Code Demo: Index.html file.
WHAT DOES ANGULARJS DEPEND ON?
It does NOT depend on Jquery.
When you load AngularJS via NuGet, it will tell you that it has no
dependencies.
MAIN CONCEPTS
Directives
Modules
Controllers / Scope
Services
Routing
DIRECTIVES
Directives are used to manipulate the DOM (e.g. hide something,
show something, disable something, replace content, bind values,
etc.)
Directives take the place of jQuery!
There are many built-in directives, most of which are self-
explanatory.
Make custom directives if you need specific DOM interaction, or
reusable widgets.
Code Review: ngApp and ngView. (used to create the AngularJS
application, and SPA viewport, respectively.)
MODULES
Modules are container for parts of the app (i.e. controllers,
services, directives, etc.).
Build your app via Modules.
The “applicaton” module must match up the ngApp directive in
order to build your application!
Code Review: app.js, controllers.js
CONTROLLER / SCOPE
Scope is basically a view model, created in a controller, for which you can bind
elements in your view.
Controller is a function used to build/initialize the scope for use.
Match a controller/scope with a view for separation of logic and presentation.
Inject services that you need into the controller function (e.g. $scope, $http,
$routeParams, etc.)
Set the controller for a view via ngController directive in markup, or via a route.
Code Review: controller.js
SERVICES
Services are singleton objects passed into controllers that are
used to perform common functions.
Built-in examples: $params, $http, $route, $location, etc.
AngularJS Recommendation: create your own services to provide
global functions, methods, and variables.
ROUTING (CORNERSTONE OF SPA)
Load the “angular-route.js” script.
Configure the $routeProvider service to set up routing (i.e match
routes with templates/controllers).
Precede URL’s with “#”!
Use the $routeParam service in controller to access querystring
parameters.
Code Review: app.js (route config), controllers.js (use of
$routeParam).
TIME PERMITTING ….
A FEW MORE COMMON DIRECTIVES
Very quickly ……………….
These do the work of jQuery!
ngShow / ngHide
ngClick
ngClass
ngDisabled
BINDING – NGMODEL DIRECTIVE
Very quickly …………..
Used to bind an element (typically an input element) to a value to
the backing controller’s scope.
Code Review: Details.cshtml
LISTS – NGREPEAT DIRECTIVE
Very quickly ……………..
Used to create a template for each item in a collection.
Used to create HTML lists and tables.
Code Review: List.cshtml

More Related Content

What's hot

Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Max Klymyshyn
 
Dive into Angular, part 4: Angular 2.0
Dive into Angular, part 4: Angular 2.0Dive into Angular, part 4: Angular 2.0
Dive into Angular, part 4: Angular 2.0Oleksii Prohonnyi
 
OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSJonathan Meiss
 
Angular 6 - The Complete Guide
Angular 6 - The Complete GuideAngular 6 - The Complete Guide
Angular 6 - The Complete GuideSam Dias
 
Introduction To Angular 4 - J2I
Introduction To Angular 4 - J2IIntroduction To Angular 4 - J2I
Introduction To Angular 4 - J2INader Debbabi
 
Beyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and moreBeyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and moreAri Lerner
 
Start your journey with angular | Basic Angular
Start your journey with angular | Basic AngularStart your journey with angular | Basic Angular
Start your journey with angular | Basic AngularAnwarul Islam
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to AngularjsGaurav Agrawal
 
Mastering angular - Dot Net Tricks
Mastering angular - Dot Net TricksMastering angular - Dot Net Tricks
Mastering angular - Dot Net TricksGaurav Singh
 
Angular 4 Introduction Tutorial
Angular 4 Introduction TutorialAngular 4 Introduction Tutorial
Angular 4 Introduction TutorialScott Lee
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2INader Debbabi
 
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...Edureka!
 
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...Edureka!
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate
 
Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...Katy Slemon
 

What's hot (20)

Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
 
Dive into Angular, part 4: Angular 2.0
Dive into Angular, part 4: Angular 2.0Dive into Angular, part 4: Angular 2.0
Dive into Angular, part 4: Angular 2.0
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
 
OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJS
 
AngularJS
AngularJSAngularJS
AngularJS
 
Angular 6 - The Complete Guide
Angular 6 - The Complete GuideAngular 6 - The Complete Guide
Angular 6 - The Complete Guide
 
Introduction To Angular 4 - J2I
Introduction To Angular 4 - J2IIntroduction To Angular 4 - J2I
Introduction To Angular 4 - J2I
 
Starting with angular js
Starting with angular js Starting with angular js
Starting with angular js
 
Beyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and moreBeyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and more
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
 
Start your journey with angular | Basic Angular
Start your journey with angular | Basic AngularStart your journey with angular | Basic Angular
Start your journey with angular | Basic Angular
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
Mastering angular - Dot Net Tricks
Mastering angular - Dot Net TricksMastering angular - Dot Net Tricks
Mastering angular - Dot Net Tricks
 
Angular 4 Introduction Tutorial
Angular 4 Introduction TutorialAngular 4 Introduction Tutorial
Angular 4 Introduction Tutorial
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2I
 
Angular routing
Angular routingAngular routing
Angular routing
 
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
 
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
 
Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...
 

Viewers also liked

AngularJS vs jQuery
AngularJS vs jQueryAngularJS vs jQuery
AngularJS vs jQueryPayPal
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Arunangsu Sahu
 
Angularjs - custom directives part 05
Angularjs - custom directives part 05Angularjs - custom directives part 05
Angularjs - custom directives part 05Mohd Abdul Baquee
 
Pemrograman Web 6 - jQuery
Pemrograman Web 6 - jQueryPemrograman Web 6 - jQuery
Pemrograman Web 6 - jQueryNur Fadli Utomo
 
A Very Public and Overdue Funeral for jQuery
A Very Public and Overdue Funeral for jQueryA Very Public and Overdue Funeral for jQuery
A Very Public and Overdue Funeral for jQueryFITC
 
Just Do it with jQuery
Just Do it with jQueryJust Do it with jQuery
Just Do it with jQueryselfteachme
 

Viewers also liked (8)

AngularJS vs jQuery
AngularJS vs jQueryAngularJS vs jQuery
AngularJS vs jQuery
 
Jquery
JqueryJquery
Jquery
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
 
Angularjs - custom directives part 05
Angularjs - custom directives part 05Angularjs - custom directives part 05
Angularjs - custom directives part 05
 
Pemrograman Web 6 - jQuery
Pemrograman Web 6 - jQueryPemrograman Web 6 - jQuery
Pemrograman Web 6 - jQuery
 
Angularjs basic part01
Angularjs basic part01Angularjs basic part01
Angularjs basic part01
 
A Very Public and Overdue Funeral for jQuery
A Very Public and Overdue Funeral for jQueryA Very Public and Overdue Funeral for jQuery
A Very Public and Overdue Funeral for jQuery
 
Just Do it with jQuery
Just Do it with jQueryJust Do it with jQuery
Just Do it with jQuery
 

Similar to Intro to AngularJS

Similar to Intro to AngularJS (20)

Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
 
Single Page Application
Single Page ApplicationSingle Page Application
Single Page Application
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad india
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docx
 
Angular JS training institute in Jaipur
           Angular JS training institute in Jaipur           Angular JS training institute in Jaipur
Angular JS training institute in Jaipur
 
What is mean stack?
What is mean stack?What is mean stack?
What is mean stack?
 
Angular Js
Angular JsAngular Js
Angular Js
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
Angular js
Angular jsAngular js
Angular js
 
Angular js
Angular jsAngular js
Angular js
 
What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?
 
Angular js workshop
Angular js workshopAngular js workshop
Angular js workshop
 
Ng talk
Ng talkNg talk
Ng talk
 
How Does Angular Work?
How Does Angular Work?How Does Angular Work?
How Does Angular Work?
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 

More from Sparkhound Inc.

IT Strategy: Aligning IT and the Business
IT Strategy: Aligning IT and the BusinessIT Strategy: Aligning IT and the Business
IT Strategy: Aligning IT and the BusinessSparkhound Inc.
 
Quality Assurance: What is it and what are the Business Benefits?
Quality Assurance: What is it and what are the Business Benefits?Quality Assurance: What is it and what are the Business Benefits?
Quality Assurance: What is it and what are the Business Benefits?Sparkhound Inc.
 
SQL Server Reporting Services (SSRS) 101
 SQL Server Reporting Services (SSRS) 101 SQL Server Reporting Services (SSRS) 101
SQL Server Reporting Services (SSRS) 101Sparkhound Inc.
 
Dashboards for Everyone with Microsoft Power BI & Excel
Dashboards for Everyone with Microsoft Power BI &  ExcelDashboards for Everyone with Microsoft Power BI &  Excel
Dashboards for Everyone with Microsoft Power BI & ExcelSparkhound Inc.
 
Spinning Brown Donuts: Why Storage Still Counts
Spinning Brown Donuts: Why Storage Still CountsSpinning Brown Donuts: Why Storage Still Counts
Spinning Brown Donuts: Why Storage Still CountsSparkhound Inc.
 
Leveraging SharePoint 2013 Search and CSR
Leveraging SharePoint 2013 Search and CSRLeveraging SharePoint 2013 Search and CSR
Leveraging SharePoint 2013 Search and CSRSparkhound Inc.
 
Ensuring Quality Mobile Apps with Testing and Crash Reporting
Ensuring Quality Mobile Apps with Testing and Crash ReportingEnsuring Quality Mobile Apps with Testing and Crash Reporting
Ensuring Quality Mobile Apps with Testing and Crash ReportingSparkhound Inc.
 
Managing Customer Expectations
Managing Customer ExpectationsManaging Customer Expectations
Managing Customer ExpectationsSparkhound Inc.
 
Virtualize All The Things!
Virtualize All The Things!Virtualize All The Things!
Virtualize All The Things!Sparkhound Inc.
 
What is "Next Generation" Analytics? How does it fit with my Business Vision?
What is "Next Generation" Analytics? How does it fit with my Business Vision?What is "Next Generation" Analytics? How does it fit with my Business Vision?
What is "Next Generation" Analytics? How does it fit with my Business Vision?Sparkhound Inc.
 
What is the right SharePoint Cloud Strategy for My Business?
What is the right SharePoint Cloud Strategy for My Business? What is the right SharePoint Cloud Strategy for My Business?
What is the right SharePoint Cloud Strategy for My Business? Sparkhound Inc.
 
Identity Management for Office 365 and Microsoft Azure
Identity Management for Office 365 and Microsoft AzureIdentity Management for Office 365 and Microsoft Azure
Identity Management for Office 365 and Microsoft AzureSparkhound Inc.
 
Integrating the BCS with Search in SharePoint 2013
Integrating the BCS with Search in SharePoint 2013Integrating the BCS with Search in SharePoint 2013
Integrating the BCS with Search in SharePoint 2013Sparkhound Inc.
 
Htf2014 managing share point projects with agile and tfs andy
Htf2014 managing share point projects with agile and tfs   andyHtf2014 managing share point projects with agile and tfs   andy
Htf2014 managing share point projects with agile and tfs andySparkhound Inc.
 
SQL Server Admin Best Practices with DMV's
SQL Server Admin Best Practices with DMV'sSQL Server Admin Best Practices with DMV's
SQL Server Admin Best Practices with DMV'sSparkhound Inc.
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Sparkhound Inc.
 
PowerShell Fundamentals for SharePoint
PowerShell Fundamentals for SharePointPowerShell Fundamentals for SharePoint
PowerShell Fundamentals for SharePointSparkhound Inc.
 
Introduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APIIntroduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APISparkhound Inc.
 
Introduction to JSLink in 2013
Introduction to JSLink in 2013Introduction to JSLink in 2013
Introduction to JSLink in 2013Sparkhound Inc.
 
Cross-Platform Mobile Development with PCLs
Cross-Platform Mobile Development with PCLsCross-Platform Mobile Development with PCLs
Cross-Platform Mobile Development with PCLsSparkhound Inc.
 

More from Sparkhound Inc. (20)

IT Strategy: Aligning IT and the Business
IT Strategy: Aligning IT and the BusinessIT Strategy: Aligning IT and the Business
IT Strategy: Aligning IT and the Business
 
Quality Assurance: What is it and what are the Business Benefits?
Quality Assurance: What is it and what are the Business Benefits?Quality Assurance: What is it and what are the Business Benefits?
Quality Assurance: What is it and what are the Business Benefits?
 
SQL Server Reporting Services (SSRS) 101
 SQL Server Reporting Services (SSRS) 101 SQL Server Reporting Services (SSRS) 101
SQL Server Reporting Services (SSRS) 101
 
Dashboards for Everyone with Microsoft Power BI & Excel
Dashboards for Everyone with Microsoft Power BI &  ExcelDashboards for Everyone with Microsoft Power BI &  Excel
Dashboards for Everyone with Microsoft Power BI & Excel
 
Spinning Brown Donuts: Why Storage Still Counts
Spinning Brown Donuts: Why Storage Still CountsSpinning Brown Donuts: Why Storage Still Counts
Spinning Brown Donuts: Why Storage Still Counts
 
Leveraging SharePoint 2013 Search and CSR
Leveraging SharePoint 2013 Search and CSRLeveraging SharePoint 2013 Search and CSR
Leveraging SharePoint 2013 Search and CSR
 
Ensuring Quality Mobile Apps with Testing and Crash Reporting
Ensuring Quality Mobile Apps with Testing and Crash ReportingEnsuring Quality Mobile Apps with Testing and Crash Reporting
Ensuring Quality Mobile Apps with Testing and Crash Reporting
 
Managing Customer Expectations
Managing Customer ExpectationsManaging Customer Expectations
Managing Customer Expectations
 
Virtualize All The Things!
Virtualize All The Things!Virtualize All The Things!
Virtualize All The Things!
 
What is "Next Generation" Analytics? How does it fit with my Business Vision?
What is "Next Generation" Analytics? How does it fit with my Business Vision?What is "Next Generation" Analytics? How does it fit with my Business Vision?
What is "Next Generation" Analytics? How does it fit with my Business Vision?
 
What is the right SharePoint Cloud Strategy for My Business?
What is the right SharePoint Cloud Strategy for My Business? What is the right SharePoint Cloud Strategy for My Business?
What is the right SharePoint Cloud Strategy for My Business?
 
Identity Management for Office 365 and Microsoft Azure
Identity Management for Office 365 and Microsoft AzureIdentity Management for Office 365 and Microsoft Azure
Identity Management for Office 365 and Microsoft Azure
 
Integrating the BCS with Search in SharePoint 2013
Integrating the BCS with Search in SharePoint 2013Integrating the BCS with Search in SharePoint 2013
Integrating the BCS with Search in SharePoint 2013
 
Htf2014 managing share point projects with agile and tfs andy
Htf2014 managing share point projects with agile and tfs   andyHtf2014 managing share point projects with agile and tfs   andy
Htf2014 managing share point projects with agile and tfs andy
 
SQL Server Admin Best Practices with DMV's
SQL Server Admin Best Practices with DMV'sSQL Server Admin Best Practices with DMV's
SQL Server Admin Best Practices with DMV's
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
 
PowerShell Fundamentals for SharePoint
PowerShell Fundamentals for SharePointPowerShell Fundamentals for SharePoint
PowerShell Fundamentals for SharePoint
 
Introduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST APIIntroduction to the SharePoint 2013 REST API
Introduction to the SharePoint 2013 REST API
 
Introduction to JSLink in 2013
Introduction to JSLink in 2013Introduction to JSLink in 2013
Introduction to JSLink in 2013
 
Cross-Platform Mobile Development with PCLs
Cross-Platform Mobile Development with PCLsCross-Platform Mobile Development with PCLs
Cross-Platform Mobile Development with PCLs
 

Recently uploaded

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Intro to AngularJS

  • 1. INTRO TO ANGULARJS Using a very simple Single Page Application Ryan Richard Ryan.Richard@Sparkhound.com
  • 2. APP DEMO AdventureWorks app demo. Review AdventureWorks solution/project structure.
  • 3. WHAT IS A SINGLE PAGE APPLICATION? Typically there is one web page that serves as the shell for the application, and dynamic content is loaded into the shell as the user navigates. The app never navigates to another main web page – all navigation is within the main page.
  • 4. WHAT IS A SINGLE PAGE APPLICATION? (CONT’D) Heavy on scripting (typically JavaScript). Most scripts are loaded when the app (i.e. the main page) launches (in essence, building the app in the browser). State can be maintained browser-side in the scripts, making the app behave more like a desktop application. Visible content (i.e. HTML templates) are fetched when needed, and then typically cached for reuse. Data is accessed asynchronously (HTTP requests).
  • 5. WHAT IS ANGULARJS? AngularJS is a JavaScript framework (made/backed by Google). It does NOT require JQuery, but it can use it (because it is JavaScript). You do NOT have to create a single page application (you can use it for other things (e.g. binding, DOM manipulation, etc.). Load the AngularJS framework file(s) and your AngularJS module file(s) just like normal scripts from a designated web page. Code Demo: Index.html file.
  • 6. WHAT DOES ANGULARJS DEPEND ON? It does NOT depend on Jquery. When you load AngularJS via NuGet, it will tell you that it has no dependencies.
  • 8. DIRECTIVES Directives are used to manipulate the DOM (e.g. hide something, show something, disable something, replace content, bind values, etc.) Directives take the place of jQuery! There are many built-in directives, most of which are self- explanatory. Make custom directives if you need specific DOM interaction, or reusable widgets. Code Review: ngApp and ngView. (used to create the AngularJS application, and SPA viewport, respectively.)
  • 9. MODULES Modules are container for parts of the app (i.e. controllers, services, directives, etc.). Build your app via Modules. The “applicaton” module must match up the ngApp directive in order to build your application! Code Review: app.js, controllers.js
  • 10. CONTROLLER / SCOPE Scope is basically a view model, created in a controller, for which you can bind elements in your view. Controller is a function used to build/initialize the scope for use. Match a controller/scope with a view for separation of logic and presentation. Inject services that you need into the controller function (e.g. $scope, $http, $routeParams, etc.) Set the controller for a view via ngController directive in markup, or via a route. Code Review: controller.js
  • 11. SERVICES Services are singleton objects passed into controllers that are used to perform common functions. Built-in examples: $params, $http, $route, $location, etc. AngularJS Recommendation: create your own services to provide global functions, methods, and variables.
  • 12. ROUTING (CORNERSTONE OF SPA) Load the “angular-route.js” script. Configure the $routeProvider service to set up routing (i.e match routes with templates/controllers). Precede URL’s with “#”! Use the $routeParam service in controller to access querystring parameters. Code Review: app.js (route config), controllers.js (use of $routeParam).
  • 14. A FEW MORE COMMON DIRECTIVES Very quickly ………………. These do the work of jQuery! ngShow / ngHide ngClick ngClass ngDisabled
  • 15. BINDING – NGMODEL DIRECTIVE Very quickly ………….. Used to bind an element (typically an input element) to a value to the backing controller’s scope. Code Review: Details.cshtml
  • 16. LISTS – NGREPEAT DIRECTIVE Very quickly …………….. Used to create a template for each item in a collection. Used to create HTML lists and tables. Code Review: List.cshtml