SlideShare a Scribd company logo
Introduction to 
By Ahmed EL-Harouny 
21 August 2014
Page 
Agenda 
› What is AngularJS? 
› Why? 
› Getting Started 
› AngularJS Building Blocks 
› Controllers 
› Directives 
› Services 
› Scope 
/ Copyright ©2014 2 by Readify Pty Ltd
Page 
What is AngularJS? 
• A JavaScript framework for building client side applications that 
runs in the browser. 
• Started by Google but quickly became a popular open source 
project. 
• It aims to simplify development, maintaining and testing 
applications. 
/ Copyright ©2014 3 by Readify Pty Ltd
Page 
Why? 
/ Copyright ©2014 4 by Readify Pty Ltd 
• Dependency Injection 
• Data Binding 
• Routing 
• Templates 
• MVC or MVVM 
• Ajax 
• Animation 
• And more!
Page 
Getting Started 
Demo (link) 
/ Copyright ©2014 5 by Readify Pty Ltd
• Modules 
• Controllers 
• Directives 
• Filters 
• Services 
• Configs 
• Routes 
Page 
AngularJS Building Blocks 
/ Copyright ©2014 6 by Readify Pty Ltd 
Services Recipes 
Constant
Page 
Modules 
- A module is a logical container for the different parts of your app – 
controllers, services, filters, directives, etc. 
- A module is not a namespace. 
/ Copyright ©2014 7 by Readify Pty Ltd 
Name Dependencies
Page 
Modules 
/ Copyright ©2014 8 by Readify Pty Ltd
Page 
Modules 
Demo (link) 
/ Copyright ©2014 9 by Readify Pty Ltd
Page 
Controllers 
- A Controller is a JavaScript constructor function that is used to work with 
scope (view model). 
- Controllers are attached to DOM using ng-controller directive. 
/ Copyright ©2014 10 by Readify Pty Ltd 
Name Dependencies Construction Function
Page 
Controllers 
Demo (link) 
/ Copyright ©2014 11 by Readify Pty Ltd
Page 
Directives 
Directives are markers on a DOM element (such as an attribute, element 
name, comment or CSS class) that tell AngularJS to attach a specified 
behavior to that DOM. 
Built-In Directives 
/ Copyright ©2014 12 by Readify Pty Ltd
Page 
Directives 
Custom Directives 
- Custom directive can be used to provide a declarative markup approach 
and reusability. 
- There are many ways to declare a directive in markup using (HTML 
attributes, elements, comments and CSS classes). 
- Prefixing directive names to prevent confusion with other HTML 
attributes and elements is a must. 
/ Copyright ©2014 13 by Readify Pty Ltd
Page 
Directives 
Demo (link) 
/ Copyright ©2014 14 by Readify Pty Ltd
- Services is a way to organize and share code across app. 
- Services are lazy initialized and singleton. 
Built-In Services 
Page 
Services 
• $http 
• $log 
• $window 
Custom Services 
/ Copyright ©2014 15 by Readify Pty Ltd
Page 
Services 
Demo (link) 
/ Copyright ©2014 16 by Readify Pty Ltd
- Scopes are driven by directives. 
- Any scope belongs exactly to one DOM element. 
Page 
Scope 
/ Copyright ©2014 17 by Readify Pty Ltd
- AngularJS will always create a root scope driven by the ng-app 
Page 
Scope 
directive. 
ng-app 
ng-controller 
ng-controller 
/ Copyright ©2014 18 by Readify Pty Ltd
Page 
Tips 
• Prefix object names. 
• Install Batarangchrome extension. 
• Know all ng-* directives. 
• Read Developer Guide (link). 
• Use chrome. 
/ Copyright ©2014 19 by Readify Pty Ltd
Thank you

More Related Content

PPTX
AngularJS
PPTX
Building SPAs with AngularJS
PDF
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
PPT
Lift web framework and Scala programming language talk
PDF
JHipster for Spring Boot webinar
PDF
Meetup SkillValue - Angular 6 : Bien démarrer son application
ODP
Routing & Navigating Pages in Angular 2
PDF
React js vs angularjs
AngularJS
Building SPAs with AngularJS
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Lift web framework and Scala programming language talk
JHipster for Spring Boot webinar
Meetup SkillValue - Angular 6 : Bien démarrer son application
Routing & Navigating Pages in Angular 2
React js vs angularjs

Similar to Introduction to AngularJs (20)

PPTX
Building share point apps with angularjs
PPTX
Step by Step - AngularJS
PPTX
Build single page applications using AngularJS on AEM
PDF
Build single page applications using AngularJS on AEM
PPTX
Build single page applications using AngularJS on AEM
PPTX
Introduction to AngularJS
PPT
Oracle mcs overview 1029
PDF
Dockerizing An Angular Application Using Git, Jenkins & Docker! | DevOps Tuto...
PPTX
SharePoint - Display Templates Overview
PPTX
Angular patterns
PPTX
Angular
PPTX
Sst hackathon express
PDF
AngularJS: Overview & Key Features
PDF
The Decoupled CMS in Financial Services
PPTX
Angular 6 Training with project in hyderabad india
PDF
Coding for Desktop and Mobile with HTML5 and Java EE 7
PPTX
Modernizing Web Apps with .NET 6.pptx
PPTX
Modernizing Web Apps with .NET 6.pptx
PDF
Overview of the AngularJS framework
PPTX
Anjular js
Building share point apps with angularjs
Step by Step - AngularJS
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
Introduction to AngularJS
Oracle mcs overview 1029
Dockerizing An Angular Application Using Git, Jenkins & Docker! | DevOps Tuto...
SharePoint - Display Templates Overview
Angular patterns
Angular
Sst hackathon express
AngularJS: Overview & Key Features
The Decoupled CMS in Financial Services
Angular 6 Training with project in hyderabad india
Coding for Desktop and Mobile with HTML5 and Java EE 7
Modernizing Web Apps with .NET 6.pptx
Modernizing Web Apps with .NET 6.pptx
Overview of the AngularJS framework
Anjular js
Ad

More from Ahmed Elharouny (7)

PPTX
Deep dive into azure durable functions
PPTX
Applying microservices principles to front end
PPTX
NoSQL, which way to go?
PPTX
Introduction to require js
PPTX
Advanced Jquery
PPTX
Introduction to Jquery
PPTX
Design patterns
Deep dive into azure durable functions
Applying microservices principles to front end
NoSQL, which way to go?
Introduction to require js
Advanced Jquery
Introduction to Jquery
Design patterns
Ad

Recently uploaded (20)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Digital Strategies for Manufacturing Companies
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Introduction to Artificial Intelligence
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Digital Strategies for Manufacturing Companies
Which alternative to Crystal Reports is best for small or large businesses.pdf
Understanding Forklifts - TECH EHS Solution
VVF-Customer-Presentation2025-Ver1.9.pptx
Transform Your Business with a Software ERP System
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Essential Infomation Tech presentation.pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
wealthsignaloriginal-com-DS-text-... (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
CHAPTER 2 - PM Management and IT Context
Introduction to Artificial Intelligence
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Reimagine Home Health with the Power of Agentic AI​
2025 Textile ERP Trends: SAP, Odoo & Oracle
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf

Introduction to AngularJs

  • 1. Introduction to By Ahmed EL-Harouny 21 August 2014
  • 2. Page Agenda › What is AngularJS? › Why? › Getting Started › AngularJS Building Blocks › Controllers › Directives › Services › Scope / Copyright ©2014 2 by Readify Pty Ltd
  • 3. Page What is AngularJS? • A JavaScript framework for building client side applications that runs in the browser. • Started by Google but quickly became a popular open source project. • It aims to simplify development, maintaining and testing applications. / Copyright ©2014 3 by Readify Pty Ltd
  • 4. Page Why? / Copyright ©2014 4 by Readify Pty Ltd • Dependency Injection • Data Binding • Routing • Templates • MVC or MVVM • Ajax • Animation • And more!
  • 5. Page Getting Started Demo (link) / Copyright ©2014 5 by Readify Pty Ltd
  • 6. • Modules • Controllers • Directives • Filters • Services • Configs • Routes Page AngularJS Building Blocks / Copyright ©2014 6 by Readify Pty Ltd Services Recipes Constant
  • 7. Page Modules - A module is a logical container for the different parts of your app – controllers, services, filters, directives, etc. - A module is not a namespace. / Copyright ©2014 7 by Readify Pty Ltd Name Dependencies
  • 8. Page Modules / Copyright ©2014 8 by Readify Pty Ltd
  • 9. Page Modules Demo (link) / Copyright ©2014 9 by Readify Pty Ltd
  • 10. Page Controllers - A Controller is a JavaScript constructor function that is used to work with scope (view model). - Controllers are attached to DOM using ng-controller directive. / Copyright ©2014 10 by Readify Pty Ltd Name Dependencies Construction Function
  • 11. Page Controllers Demo (link) / Copyright ©2014 11 by Readify Pty Ltd
  • 12. Page Directives Directives are markers on a DOM element (such as an attribute, element name, comment or CSS class) that tell AngularJS to attach a specified behavior to that DOM. Built-In Directives / Copyright ©2014 12 by Readify Pty Ltd
  • 13. Page Directives Custom Directives - Custom directive can be used to provide a declarative markup approach and reusability. - There are many ways to declare a directive in markup using (HTML attributes, elements, comments and CSS classes). - Prefixing directive names to prevent confusion with other HTML attributes and elements is a must. / Copyright ©2014 13 by Readify Pty Ltd
  • 14. Page Directives Demo (link) / Copyright ©2014 14 by Readify Pty Ltd
  • 15. - Services is a way to organize and share code across app. - Services are lazy initialized and singleton. Built-In Services Page Services • $http • $log • $window Custom Services / Copyright ©2014 15 by Readify Pty Ltd
  • 16. Page Services Demo (link) / Copyright ©2014 16 by Readify Pty Ltd
  • 17. - Scopes are driven by directives. - Any scope belongs exactly to one DOM element. Page Scope / Copyright ©2014 17 by Readify Pty Ltd
  • 18. - AngularJS will always create a root scope driven by the ng-app Page Scope directive. ng-app ng-controller ng-controller / Copyright ©2014 18 by Readify Pty Ltd
  • 19. Page Tips • Prefix object names. • Install Batarangchrome extension. • Know all ng-* directives. • Read Developer Guide (link). • Use chrome. / Copyright ©2014 19 by Readify Pty Ltd