SlideShare una empresa de Scribd logo
1 de 5
Descargar para leer sin conexión
Mobile phone future
AngularJS
Understanding AngularJS
Information from various sources
AngularJS is a JavaScript web framework aimed to make web apps simple to build and easy to
maintain.
We'll start by building a simple AngularJS app. After making this app, we'll generalize a few steps
that can be used to build more complex apps. By the end of this course, you'll be able to use this
sequence of steps to jumpstart your own AngularJS apps.
1.
Let's get started by making a simple AngularJS app. We'll explain each step in the next exercise.
In app.js, type in the contents exactly as you see here:
var app = angular.module("myApp", []);
2.
Open up index.html. Modify the <body> tag so it looks like this:
<body ng-app="myApp">
3.
Open up js/controllers/MainController.js. Type in the contents exactly as you see here:
app.controller('MainController', ['$scope', function($scope) {
$scope.title = 'Top Sellers in Books';
}]);
4.
Go to index.html. Modify the <div class="main"> tag so it looks like this:
<div class="main" ng-controller="MainController">
5.
In index.html inside <div class="main">, modify the <h1> element so it looks like this:
<h1>{{ title }}</h1>
View the AngularJS app in the browser by visiting http://localhost:8000. The "Top Sellers in Books"
content appears as the heading of the page.
Support
If you are stuck and have questions about the course, please visit the Q&A Forum. See a bug or are
having technical issues? Please report the problem.
Q&A ForumReport a problem
Additionally, you can get a clean slate for this exercise.
Awesome! You built an AngularJS app. How does it work?
1. In app.js, we created a new module named MyApp. A module contains the different
components of an AngularJS app.
2. Then, in index.html we added <body ng-app="myApp">. The ng-app is called a
directive. It tells AngularJS that the MyApp module will live within the <body> element,
termed the application's scope. In other words, we used the ng-app directive to define the
application scope.
3. In MainController.js we created a new controller named MainController. A controller
manages the app's data. Here we use the property title to store a string, and attach it to
$scope.
4. Then, in index.html, we added <div class="main" ng-
controller="MainController">. Like ng-app, ng-controller is a directive
that defines the controller scope. This means that properties attached to $scope in
MainController become available to use within <div class="main">.
5. Inside <div class="main"> we accessed $scope.title using {{ title }}.
This is called an expression. Expressions are used to display values on the page.
6. The value of title showed up when we viewed the app in the browser.
Instructions
1.
Both the controller MainController and the view index.html have access to $scope. This
means we can use $scope to communicate between the controller and the view. In the controller,
change the value of title to your own string.
2.
Likewise, any new properties attached to $scope will become available to use in the view. In the
controller, attach promo to $scope, and set its value to your own string.
3.
In the view under the <h1> element, add an <h2> element and use an expression to display
promo on the page.
1
….....................................................................................
var app = angular.module("myApp", []);
….....................................................................................
<!doctype html>
<html>
<head>
<link href="http://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css"
rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Roboto:500,300,700,400' rel='stylesheet'
type='text/css'>
<link href="css/main.css" rel="stylesheet" />
<!-- Include the AngularJS library -->
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>
</head>
<body ng-app="myApp">
<div class="header">
<div class="container">
<h1>Book End</h1>
</div>
</div>
<div class="main" ng-controller="MainController">
<div class="container">
<h1> {{ title }} </h1>
<h2> {{ promo }} </h2>
</div>
</div>
<div class="footer">
<div class="container">
<h2>Available for iPhone and Android.</h2>
<img src="http://s3.amazonaws.com/codecademy-content/projects/shutterbugg/app-store.png"
width="120px" />
<img src="http://s3.amazonaws.com/codecademy-content/projects/shutterbugg/google-
play.png" width="110px" />
</div>
</div>
<!-- Modules -->
<script src="js/app.js"></script>
<!-- Controllers -->
<script src="js/controllers/MainController.js"></script>
</body>
</html>
….....................................................................................
app.controller('MainController', ['$scope', function($scope) {
$scope.title = 'This Month's Bestsellers';
$scope.promo = 'The most popular books this month.';
}]);
Layout
Source:
http://campus.codeschool.com/courses/shaping-up-with-angular-js/contents
http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/1/section/1/video/1

Más contenido relacionado

La actualidad más candente

The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2Maurice De Beijer [MVP]
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS FrameworkRaveendra R
 
Android appwidget
Android appwidgetAndroid appwidget
Android appwidgetKrazy Koder
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Marios Fakiolas
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2Maurice De Beijer [MVP]
 
Android Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection WidgetAndroid Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection WidgetPrajyot Mainkar
 
Up & running with ECMAScript6
Up & running with ECMAScript6Up & running with ECMAScript6
Up & running with ECMAScript6Nir Kaufman
 
Advantages of AngularJS over jQuery
Advantages of AngularJS over jQueryAdvantages of AngularJS over jQuery
Advantages of AngularJS over jQueryDipendra Shekhawat
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency InjectionNir Kaufman
 
Get rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesGet rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesMarios Fakiolas
 
Angular 2 - How we got here?
Angular 2 - How we got here?Angular 2 - How we got here?
Angular 2 - How we got here?Marios Fakiolas
 
Beyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and moreBeyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and moreAri Lerner
 
Create rest webservice for oracle public api using java class via jdeveloper
Create rest webservice for oracle public api using java class via jdeveloperCreate rest webservice for oracle public api using java class via jdeveloper
Create rest webservice for oracle public api using java class via jdevelopershravan kumar chelika
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation Phan Tuan
 
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 -  Sebastian MüllerData Flow Patterns in Angular 2 -  Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian MüllerSebastian Holstein
 

La actualidad más candente (20)

The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
 
Android appwidget
Android appwidgetAndroid appwidget
Android appwidget
 
Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...Web components are the future of the web - Take advantage of new web technolo...
Web components are the future of the web - Take advantage of new web technolo...
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
 
Android Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection WidgetAndroid Tutorials - Powering with Selection Widget
Android Tutorials - Powering with Selection Widget
 
Up & running with ECMAScript6
Up & running with ECMAScript6Up & running with ECMAScript6
Up & running with ECMAScript6
 
Advantages of AngularJS over jQuery
Advantages of AngularJS over jQueryAdvantages of AngularJS over jQuery
Advantages of AngularJS over jQuery
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
 
Get rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesGet rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directives
 
Angular 2 - How we got here?
Angular 2 - How we got here?Angular 2 - How we got here?
Angular 2 - How we got here?
 
Android Widget
Android WidgetAndroid Widget
Android Widget
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
 
Beyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and moreBeyond AngularJS: Best practices and more
Beyond AngularJS: Best practices and more
 
What's new in Angular 2?
What's new in Angular 2?What's new in Angular 2?
What's new in Angular 2?
 
Build Restful Service using ADFBC
Build Restful Service using ADFBCBuild Restful Service using ADFBC
Build Restful Service using ADFBC
 
Create rest webservice for oracle public api using java class via jdeveloper
Create rest webservice for oracle public api using java class via jdeveloperCreate rest webservice for oracle public api using java class via jdeveloper
Create rest webservice for oracle public api using java class via jdeveloper
 
Angular Seminar-js
Angular Seminar-jsAngular Seminar-js
Angular Seminar-js
 
AngularJs presentation
AngularJs presentation AngularJs presentation
AngularJs presentation
 
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 -  Sebastian MüllerData Flow Patterns in Angular 2 -  Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian Müller
 

Destacado

John Allen, WPE-2008 Presentation
John Allen, WPE-2008 PresentationJohn Allen, WPE-2008 Presentation
John Allen, WPE-2008 Presentationwpe
 
Athens Digital Week
Athens Digital WeekAthens Digital Week
Athens Digital Weekpatrimal
 
Si And Engineering Philosophy Presentation 081110
Si And Engineering Philosophy Presentation 081110Si And Engineering Philosophy Presentation 081110
Si And Engineering Philosophy Presentation 081110wpe
 
Justin josh graduation day 2010
Justin josh graduation day 2010 Justin josh graduation day 2010
Justin josh graduation day 2010 cyrel castro
 
nondang
nondangnondang
nondangsakorn
 
juan zapata
juan zapatajuan zapata
juan zapatajuan.z
 
Human resources challenges v5 4 5-2012
Human resources challenges v5 4 5-2012Human resources challenges v5 4 5-2012
Human resources challenges v5 4 5-2012atkinr1
 
PresentacióN Entorn
PresentacióN EntornPresentacióN Entorn
PresentacióN Entornlauragf
 
Gender and Interactive Media
Gender and Interactive MediaGender and Interactive Media
Gender and Interactive Mediahckrus01
 
Trends In Human Resources Management (7) 7 8 2010
Trends In Human Resources Management (7) 7 8 2010Trends In Human Resources Management (7) 7 8 2010
Trends In Human Resources Management (7) 7 8 2010atkinr1
 

Destacado (20)

Petarkadas.com
Petarkadas.comPetarkadas.com
Petarkadas.com
 
John Allen, WPE-2008 Presentation
John Allen, WPE-2008 PresentationJohn Allen, WPE-2008 Presentation
John Allen, WPE-2008 Presentation
 
Maka1
Maka1Maka1
Maka1
 
Introduction to HRXRD
Introduction to HRXRDIntroduction to HRXRD
Introduction to HRXRD
 
Athens Digital Week
Athens Digital WeekAthens Digital Week
Athens Digital Week
 
Mascotas
MascotasMascotas
Mascotas
 
RhiZone Energy Solutions
RhiZone Energy SolutionsRhiZone Energy Solutions
RhiZone Energy Solutions
 
Ppt Ejer
Ppt EjerPpt Ejer
Ppt Ejer
 
Si And Engineering Philosophy Presentation 081110
Si And Engineering Philosophy Presentation 081110Si And Engineering Philosophy Presentation 081110
Si And Engineering Philosophy Presentation 081110
 
Justin josh graduation day 2010
Justin josh graduation day 2010 Justin josh graduation day 2010
Justin josh graduation day 2010
 
nondang
nondangnondang
nondang
 
juan zapata
juan zapatajuan zapata
juan zapata
 
Human resources challenges v5 4 5-2012
Human resources challenges v5 4 5-2012Human resources challenges v5 4 5-2012
Human resources challenges v5 4 5-2012
 
PresentacióN Entorn
PresentacióN EntornPresentacióN Entorn
PresentacióN Entorn
 
Online Turizm 101
Online Turizm 101Online Turizm 101
Online Turizm 101
 
Turizm 2.0
Turizm 2.0Turizm 2.0
Turizm 2.0
 
All About Me
All About MeAll About Me
All About Me
 
Gender and Interactive Media
Gender and Interactive MediaGender and Interactive Media
Gender and Interactive Media
 
Tv
TvTv
Tv
 
Trends In Human Resources Management (7) 7 8 2010
Trends In Human Resources Management (7) 7 8 2010Trends In Human Resources Management (7) 7 8 2010
Trends In Human Resources Management (7) 7 8 2010
 

Similar a Mobile phone future angular js

One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJSYashobanta Bai
 
ANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 schANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 schkannikadg
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS BasicsRavi Mone
 
Angular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfAngular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfJohnLeo57
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to AngularjsGaurav Agrawal
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docxtelegramvip
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate
 
Create Location Sharing apps using the Ionic framework
Create Location Sharing apps using the Ionic framework					Create Location Sharing apps using the Ionic framework
Create Location Sharing apps using the Ionic framework Shelly Megan
 
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
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIEric Wise
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project ReportKodexhub
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshareSaleemMalik52
 
AgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllersAgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllersjobinThomas54
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development GuideNitin Giri
 

Similar a Mobile phone future angular js (20)

One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
 
ANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 schANGULAR JS LAB MANUAL(final) vtu2021 sch
ANGULAR JS LAB MANUAL(final) vtu2021 sch
 
Angular js
Angular jsAngular js
Angular js
 
AngularJS 101
AngularJS 101AngularJS 101
AngularJS 101
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
Angular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdfAngular Interview Questions-PDF.pdf
Angular Interview Questions-PDF.pdf
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
angularjs_tutorial.docx
angularjs_tutorial.docxangularjs_tutorial.docx
angularjs_tutorial.docx
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
 
Create Location Sharing apps using the Ionic framework
Create Location Sharing apps using the Ionic framework					Create Location Sharing apps using the Ionic framework
Create Location Sharing apps using the Ionic framework
 
Starting with angular js
Starting with angular js Starting with angular js
Starting with angular js
 
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
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPI
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
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
 
Angular js
Angular jsAngular js
Angular js
 
AgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllersAgularJS basics- angular directives and controllers
AgularJS basics- angular directives and controllers
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
 

Último

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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 DevelopmentsTrustArc
 
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 2024The Digital Insurer
 
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, Adobeapidays
 
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 Scriptwesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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...Martijn de Jong
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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...DianaGray10
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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 TerraformAndrey Devyatkin
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
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 DiscoveryTrustArc
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
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 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
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 

Mobile phone future angular js

  • 1. Mobile phone future AngularJS Understanding AngularJS Information from various sources
  • 2. AngularJS is a JavaScript web framework aimed to make web apps simple to build and easy to maintain. We'll start by building a simple AngularJS app. After making this app, we'll generalize a few steps that can be used to build more complex apps. By the end of this course, you'll be able to use this sequence of steps to jumpstart your own AngularJS apps. 1. Let's get started by making a simple AngularJS app. We'll explain each step in the next exercise. In app.js, type in the contents exactly as you see here: var app = angular.module("myApp", []); 2. Open up index.html. Modify the <body> tag so it looks like this: <body ng-app="myApp"> 3. Open up js/controllers/MainController.js. Type in the contents exactly as you see here: app.controller('MainController', ['$scope', function($scope) { $scope.title = 'Top Sellers in Books'; }]); 4. Go to index.html. Modify the <div class="main"> tag so it looks like this: <div class="main" ng-controller="MainController"> 5. In index.html inside <div class="main">, modify the <h1> element so it looks like this: <h1>{{ title }}</h1> View the AngularJS app in the browser by visiting http://localhost:8000. The "Top Sellers in Books" content appears as the heading of the page. Support If you are stuck and have questions about the course, please visit the Q&A Forum. See a bug or are having technical issues? Please report the problem. Q&A ForumReport a problem Additionally, you can get a clean slate for this exercise. Awesome! You built an AngularJS app. How does it work? 1. In app.js, we created a new module named MyApp. A module contains the different components of an AngularJS app.
  • 3. 2. Then, in index.html we added <body ng-app="myApp">. The ng-app is called a directive. It tells AngularJS that the MyApp module will live within the <body> element, termed the application's scope. In other words, we used the ng-app directive to define the application scope. 3. In MainController.js we created a new controller named MainController. A controller manages the app's data. Here we use the property title to store a string, and attach it to $scope. 4. Then, in index.html, we added <div class="main" ng- controller="MainController">. Like ng-app, ng-controller is a directive that defines the controller scope. This means that properties attached to $scope in MainController become available to use within <div class="main">. 5. Inside <div class="main"> we accessed $scope.title using {{ title }}. This is called an expression. Expressions are used to display values on the page. 6. The value of title showed up when we viewed the app in the browser. Instructions 1. Both the controller MainController and the view index.html have access to $scope. This means we can use $scope to communicate between the controller and the view. In the controller, change the value of title to your own string. 2. Likewise, any new properties attached to $scope will become available to use in the view. In the controller, attach promo to $scope, and set its value to your own string. 3. In the view under the <h1> element, add an <h2> element and use an expression to display promo on the page. 1 …..................................................................................... var app = angular.module("myApp", []);
  • 4. …..................................................................................... <!doctype html> <html> <head> <link href="http://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" /> <link href='http://fonts.googleapis.com/css?family=Roboto:500,300,700,400' rel='stylesheet' type='text/css'> <link href="css/main.css" rel="stylesheet" /> <!-- Include the AngularJS library --> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script> </head> <body ng-app="myApp"> <div class="header"> <div class="container"> <h1>Book End</h1> </div> </div> <div class="main" ng-controller="MainController"> <div class="container"> <h1> {{ title }} </h1> <h2> {{ promo }} </h2> </div> </div> <div class="footer"> <div class="container"> <h2>Available for iPhone and Android.</h2> <img src="http://s3.amazonaws.com/codecademy-content/projects/shutterbugg/app-store.png" width="120px" /> <img src="http://s3.amazonaws.com/codecademy-content/projects/shutterbugg/google- play.png" width="110px" /> </div> </div> <!-- Modules --> <script src="js/app.js"></script> <!-- Controllers --> <script src="js/controllers/MainController.js"></script> </body> </html>
  • 5. …..................................................................................... app.controller('MainController', ['$scope', function($scope) { $scope.title = 'This Month's Bestsellers'; $scope.promo = 'The most popular books this month.'; }]); Layout Source: http://campus.codeschool.com/courses/shaping-up-with-angular-js/contents http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/1/section/1/video/1