SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
AngularJS
 A Brief Introduction
KYJSUG March 2013
What is AngularJS?
Client Side Browser App Framework
Sponsored by Google
Open Source

http://angularjs.org/
View
HTML Centric

Declarative

Directives
 Write your own tags

Templating
Controller
Provides the interaction point between the
scoped Model and the

Resources/Services provided by the framework
  via Dependency Injection (DI)
Model
Data Binding
  Model

Scope
  $scope
Other topics
Routing
  Tames management of single page apps
     Often involving Partial Views

Testing
  Testacular
Resources
Seed project with base layout
  https://github.com/angular/angular-seed

Tutorials, Videos and Docs
  http://angularjs.org/ - Learn
  http://egghead.io
Example App HTML
<html>
<head>
 <title>Demo</title>
</head>
<body ng-app ng-controller="AttendeeCtrl">
  <h2>Attendees</h2>
  <div>
   <span>{{attendees.length}} in Attendance</span>
   <ul>
     <li ng-repeat="attendee in attendees">
      {{attendee.name}}
     </li>
   </ul>
   <form ng-submit="addAttendee()">
     <input type="text" size="30" ng-model="attendeeName"
             placeholder="add new name here">
     <input type="submit" value="add">
   </form>
  </div>
 <script src="lib/angular/angular.js"></script>
 <script src="js/controllers.js"></script>
</body>
</html>
Example App Controller JS
'use strict';
/* Controllers */
function AttendeeCtrl($scope) {
    // Some sample data
    $scope.attendees = [
     {name:'Ronald'},
     {name:'Aaron'}];


    $scope.addAttendee = function() {
     $scope.attendees.push({name:$scope.attendeeName});
     $scope.attendeeName = '';
    };
}

Weitere ähnliche Inhalte

Was ist angesagt? (11)

Angular
AngularAngular
Angular
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
WJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJSWJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJS
 
Angular introduction basic
Angular introduction basicAngular introduction basic
Angular introduction basic
 
Angular js
Angular jsAngular js
Angular js
 
AngularJS
AngularJSAngularJS
AngularJS
 
Angular js
Angular jsAngular js
Angular js
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questions
 
AngularJS
AngularJSAngularJS
AngularJS
 
AngularJS interview questions
AngularJS interview questionsAngularJS interview questions
AngularJS interview questions
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 

Ähnlich wie An Intro to AngularJS

AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
Maurice De Beijer [MVP]
 

Ähnlich wie An Intro to AngularJS (20)

GDG Atlanta - Angular.js Demo and Workshop
GDG Atlanta - Angular.js Demo and WorkshopGDG Atlanta - Angular.js Demo and Workshop
GDG Atlanta - Angular.js Demo and Workshop
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle StudiosAngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
 
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
 
introduction to Angularjs basics
introduction to Angularjs basicsintroduction to Angularjs basics
introduction to Angularjs basics
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docx
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
 
AangularJS Framework
AangularJS FrameworkAangularJS Framework
AangularJS Framework
 
AngularJS Framework
AngularJS FrameworkAngularJS Framework
AngularJS Framework
 
AngularJS 1.x training
AngularJS 1.x trainingAngularJS 1.x training
AngularJS 1.x training
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete Course
 
AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014
 
Starting with angular js
Starting with angular js Starting with angular js
Starting with angular js
 
AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
 
Angular JS deep dive
Angular JS deep diveAngular JS deep dive
Angular JS deep dive
 
AngularJS in 60ish Minutes
AngularJS in 60ish MinutesAngularJS in 60ish Minutes
AngularJS in 60ish Minutes
 
Working with AngularJS
Working with AngularJSWorking with AngularJS
Working with AngularJS
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 

Mehr von Kentucky JavaScript Users Group

Mehr von Kentucky JavaScript Users Group (9)

Serverless GraphQL with AWS AppSync & AWS Amplify
Serverless GraphQL with AWS AppSync & AWS AmplifyServerless GraphQL with AWS AppSync & AWS Amplify
Serverless GraphQL with AWS AppSync & AWS Amplify
 
CQRS and Event Sourcing
CQRS and Event SourcingCQRS and Event Sourcing
CQRS and Event Sourcing
 
A Rubyist Tries AngularJS
A Rubyist Tries AngularJSA Rubyist Tries AngularJS
A Rubyist Tries AngularJS
 
Intro to Three.js
Intro to Three.jsIntro to Three.js
Intro to Three.js
 
PhoneGap - JavaScript for Mobile Apps
PhoneGap - JavaScript for Mobile AppsPhoneGap - JavaScript for Mobile Apps
PhoneGap - JavaScript for Mobile Apps
 
Node and SocketIO
Node and SocketIONode and SocketIO
Node and SocketIO
 
Node.js Introduction
Node.js IntroductionNode.js Introduction
Node.js Introduction
 
Underscore and Backbone Models
Underscore and Backbone ModelsUnderscore and Backbone Models
Underscore and Backbone Models
 
JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

An Intro to AngularJS

  • 1. AngularJS A Brief Introduction KYJSUG March 2013
  • 2. What is AngularJS? Client Side Browser App Framework Sponsored by Google Open Source http://angularjs.org/
  • 4. Controller Provides the interaction point between the scoped Model and the Resources/Services provided by the framework via Dependency Injection (DI)
  • 5. Model Data Binding Model Scope $scope
  • 6. Other topics Routing Tames management of single page apps Often involving Partial Views Testing Testacular
  • 7. Resources Seed project with base layout https://github.com/angular/angular-seed Tutorials, Videos and Docs http://angularjs.org/ - Learn http://egghead.io
  • 8. Example App HTML <html> <head> <title>Demo</title> </head> <body ng-app ng-controller="AttendeeCtrl"> <h2>Attendees</h2> <div> <span>{{attendees.length}} in Attendance</span> <ul> <li ng-repeat="attendee in attendees"> {{attendee.name}} </li> </ul> <form ng-submit="addAttendee()"> <input type="text" size="30" ng-model="attendeeName" placeholder="add new name here"> <input type="submit" value="add"> </form> </div> <script src="lib/angular/angular.js"></script> <script src="js/controllers.js"></script> </body> </html>
  • 9. Example App Controller JS 'use strict'; /* Controllers */ function AttendeeCtrl($scope) { // Some sample data $scope.attendees = [ {name:'Ronald'}, {name:'Aaron'}]; $scope.addAttendee = function() { $scope.attendees.push({name:$scope.attendeeName}); $scope.attendeeName = ''; }; }