SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
ONE PAGE APP WITH


adam.stipak@gmail.com | @new_POPE
WTF, WHICH TOOL I NEED ???
   Backbone.js
   Ember.js
   Google Closure
   Spine
   jQuery (non FW)
   Este.js (Is it not dead? ;-))
   ...
   No thanks, AngularJS is cool ;-)
WHY ?
Bootstrapping
Module based
Templates
2-way data binding (It's fucking good)
Dependency Injection
Routing
Directives
BOOTSTRAPPING
                     Step 1:
<citsc"i/saglrmnj"<srp>
 srp r=lbj/nua.i.s>/cit


                     Step 2:
<tln-p>
 hm gap


                     Result:
{12}i 3
 {+} s


          I'm using this way (RequireJS)
vrap=aglrmdl(ap,[*dp *];
 a p  nua.oue'p' / es /)
aglrbosrpdcmn,[ap];
 nua.otta(ouet 'p')
MODULE BASED
               HTML
<tln-p=mAp>
 hm gap"yp"


                JS
vrmAp=aglrmdl(mAp,[) / N dp.
 a yp nua.oue'yp' ]; / o es

/ Cleto o U drcie.
 / olcin f I ietvs
aglrmdl(uDrcie' [*.*];
 nua.oue'iietvs, /../)

vrmAp=aglrmdl(mAp,[uDrcie')
 a yp nua.oue'yp' 'iietvs];
TEMPLATES
<l
 u>
 <in-eet"tmi [wb,'lmn' '1'"
 l grpa=ie n 'e' eeet, #4]>
 {ie}
  {tm}
 <l>
 /i
<dv
 /i>


               web
               element
               #14
WITH CONTROLLERS
                    JS
mApcnrle(Tmltsotolr,fnto(soe {
 yp.otolr'epaeCnrle' ucin$cp)
    $cp.tm =[wb,'lmn' '1';
     soeies 'e' eeet, #4]
};
 )

                 Template
<i n-otolr"epaeCnrle"
 dv gcnrle=Tmltsotolr>
     <pnn-eet"tmi ies>
      sa grpa=ie n tm"
          {ie}<ml>{idx}/ml>
           {tm}sal{$ne}<sal
     <sa>
      /pn
<dv
 /i>


                   Result
         web 0   element 1 #14 2
ASYNC TEMPLATES
<i n-iw <- Ol oeo tepg ->
 dv gve> !- ny n n h ae -


             But, you can use this
<i n-nld=tmltsfohm"
 dv gicue"epae/o.tl>

             with nested levels ;-)

 AngularJS loads the templates asynchronously.
2-WAY DATA BINDING
              Controller
$cp.nu =";
 soeipt  "
$cp.laIpt=fnto( {
 soecernu   ucin)
    $cp.nu =";
     soeipt  "
};


              Template
<nu n-oe=ipt>
 ipt gmdl"nu"
<nu n-lc=cernu("tp=bto"vle"la!>
 ipt gcik"laIpt) ye"utn au=Cer"


                Result
                         Clear!


           $scope.input = ""
HOW IT WORKS?
  ONE WAY DATA BINGING
HOW IT WORKS?
 TWO IS MORE THAN ONE, BRO
HOW IT WORKS?
     SCOPES
DEPENDENCY INJECTION
  Dependecny injector is better than Chuck N.
mApsrie'yevc' fnto( {*.*};
 yp.evc(mSrie, ucin) /../)

mApcnrle(SmIesotolr,fnto(yevc){
 yp.otolr'oetmCnrle' ucinmSrie
 / mSriewsatmtclyijce
  / yevc a uoaial netd

  mSriegt'oept'.ucs(ucindt){
   yevc.e(sm/ah)scesfnto(aa
    $cp.tm =dt.tm;
     soeies aaies
  };
   )
};
 )
HOW IT WORKS?
ROUTING
           $routeProvider
mApcni('ruervdr,fnto(r){
 yp.ofg[$otPoie' ucin$p
 $p
  r
   .hn'fo,{
    we(/o'
     tmltUl 'p/o.tl,
      epaer: tlfohm'
     cnrle:Footolr
      otolr oCnrle
   })
   .tews(rdrcT:'br};
    ohrie{eieto /a')
})
 ];
DIRECTIVES
          It's all about directives.
mApdrcie'ldr,fnto( {
 yp.ietv(sie' ucin)
  rtr {
   eun
    ln:fnto(cp,eeet ats {
     ik ucinsoe lmn, tr)
      $eeet.ldr)
       (lmn)sie(;
    }
  }
};
 )




             Value of slider: 5
and so much more on angularjs.org
        Thanks for coming

   @new_POPE | newpope.org

Contenu connexe

Tendances

Bestpractices nl
Bestpractices nlBestpractices nl
Bestpractices nlWilfred Nas
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & ToolsIan Barber
 
Four Ways to add Features to Ext JS
Four Ways to add Features to Ext JSFour Ways to add Features to Ext JS
Four Ways to add Features to Ext JSShea Frederick
 
Increase productivity with doctrine2 extensions
Increase productivity with doctrine2 extensionsIncrease productivity with doctrine2 extensions
Increase productivity with doctrine2 extensionsGediminas Morkevicius
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitmfrost503
 
Ejercicio 3
Ejercicio 3Ejercicio 3
Ejercicio 3ismaxmax
 
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015Rafael Specht da Silva
 
JavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooJavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooYasuharu Nakano
 
Capture and replay hardware behaviour for regression testing and bug reporting
Capture and replay hardware behaviour for regression testing and bug reportingCapture and replay hardware behaviour for regression testing and bug reporting
Capture and replay hardware behaviour for regression testing and bug reportingmartin-pitt
 

Tendances (19)

Mysql:Operators
Mysql:OperatorsMysql:Operators
Mysql:Operators
 
Bestpractices nl
Bestpractices nlBestpractices nl
Bestpractices nl
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
Kumpulan script jahil
Kumpulan script jahilKumpulan script jahil
Kumpulan script jahil
 
Four Ways to add Features to Ext JS
Four Ways to add Features to Ext JSFour Ways to add Features to Ext JS
Four Ways to add Features to Ext JS
 
Ext oo
Ext ooExt oo
Ext oo
 
Sencha Touch Intro
Sencha Touch IntroSencha Touch Intro
Sencha Touch Intro
 
Starting out with Ember.js
Starting out with Ember.jsStarting out with Ember.js
Starting out with Ember.js
 
Increase productivity with doctrine2 extensions
Increase productivity with doctrine2 extensionsIncrease productivity with doctrine2 extensions
Increase productivity with doctrine2 extensions
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnit
 
Wso2 esb-rest-integration
Wso2 esb-rest-integrationWso2 esb-rest-integration
Wso2 esb-rest-integration
 
Introduction to lua
Introduction to luaIntroduction to lua
Introduction to lua
 
Ejercicio 3
Ejercicio 3Ejercicio 3
Ejercicio 3
 
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
Não alimente os trolls: JavaScript é bonito - FrontInSM 2015
 
Introdução a worker 2.0
Introdução a worker 2.0Introdução a worker 2.0
Introdução a worker 2.0
 
JavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooJavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring Roo
 
Algoritma 5 november wiwik p.l
Algoritma 5 november wiwik p.lAlgoritma 5 november wiwik p.l
Algoritma 5 november wiwik p.l
 
Send mail-oracle11g-det
Send mail-oracle11g-detSend mail-oracle11g-det
Send mail-oracle11g-det
 
Capture and replay hardware behaviour for regression testing and bug reporting
Capture and replay hardware behaviour for regression testing and bug reportingCapture and replay hardware behaviour for regression testing and bug reporting
Capture and replay hardware behaviour for regression testing and bug reporting
 

Similaire à One page app with AngularJS

Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony componentsMichael Peacock
 
Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)Corley S.r.l.
 
A Backbone.js Tutorial for the Impatient - Part 1
A Backbone.js Tutorial for the Impatient - Part 1A Backbone.js Tutorial for the Impatient - Part 1
A Backbone.js Tutorial for the Impatient - Part 1jsalonen Salonen
 
Angular.js + Rails at WeWork or: The Accidental Feature
Angular.js + Rails at WeWork or: The Accidental FeatureAngular.js + Rails at WeWork or: The Accidental Feature
Angular.js + Rails at WeWork or: The Accidental FeatureJonathan Magen
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and mythsWojciech Sznapka
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSPat Cito
 
Advanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingAdvanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingLars Thorup
 
Beginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleBeginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleAri Lerner
 
Front End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSFront End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSJoe Sepi
 
Learn Frontend Testing
Learn Frontend TestingLearn Frontend Testing
Learn Frontend TestingRyan Roemer
 
Drupal 8 in action, the route to the method
Drupal 8 in action, the route to the methodDrupal 8 in action, the route to the method
Drupal 8 in action, the route to the methodjuanolalla
 
Flow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidFlow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidSomenath Mukhopadhyay
 
PhpUnit Best Practices
PhpUnit Best PracticesPhpUnit Best Practices
PhpUnit Best PracticesEdorian
 
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...Ari Lerner
 
Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?tvaleev
 
49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)Kritika910
 
Building modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaBuilding modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaAlexander Gyoshev
 
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011John Ford
 

Similaire à One page app with AngularJS (20)

Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
 
Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)
 
A Backbone.js Tutorial for the Impatient - Part 1
A Backbone.js Tutorial for the Impatient - Part 1A Backbone.js Tutorial for the Impatient - Part 1
A Backbone.js Tutorial for the Impatient - Part 1
 
Angular.js + Rails at WeWork or: The Accidental Feature
Angular.js + Rails at WeWork or: The Accidental FeatureAngular.js + Rails at WeWork or: The Accidental Feature
Angular.js + Rails at WeWork or: The Accidental Feature
 
Automated tests - facts and myths
Automated tests - facts and mythsAutomated tests - facts and myths
Automated tests - facts and myths
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Advanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit TestingAdvanced QUnit - Front-End JavaScript Unit Testing
Advanced QUnit - Front-End JavaScript Unit Testing
 
Beginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleBeginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at Google
 
Front End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSFront End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJS
 
Javascript: The Important Bits
Javascript: The Important BitsJavascript: The Important Bits
Javascript: The Important Bits
 
Learn Frontend Testing
Learn Frontend TestingLearn Frontend Testing
Learn Frontend Testing
 
Drupal 8 in action, the route to the method
Drupal 8 in action, the route to the methodDrupal 8 in action, the route to the method
Drupal 8 in action, the route to the method
 
Flow of events during Media Player creation in Android
Flow of events during Media Player creation in AndroidFlow of events during Media Player creation in Android
Flow of events during Media Player creation in Android
 
PhpUnit Best Practices
PhpUnit Best PracticesPhpUnit Best Practices
PhpUnit Best Practices
 
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
How to create a 3.2 billion dollar business in 20 minutes: combining AngularJ...
 
PL/SQL Unit Testing Can Be Fun!
PL/SQL Unit Testing Can Be Fun!PL/SQL Unit Testing Can Be Fun!
PL/SQL Unit Testing Can Be Fun!
 
Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?Joker 2015 - Валеев Тагир - Что же мы измеряем?
Joker 2015 - Валеев Тагир - Что же мы измеряем?
 
49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)
 
Building modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaBuilding modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and java
 
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
 

Plus de Adam Štipák

Techforce #5 es in 2018
Techforce #5   es in 2018Techforce #5   es in 2018
Techforce #5 es in 2018Adam Štipák
 
Rubyslava #66 (container edition)
Rubyslava #66 (container edition) Rubyslava #66 (container edition)
Rubyslava #66 (container edition) Adam Štipák
 
FEI Bratislava 2017 - Docker
FEI Bratislava 2017 - DockerFEI Bratislava 2017 - Docker
FEI Bratislava 2017 - DockerAdam Štipák
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Adam Štipák
 
Introduction to Domain Driven Design (Webtlak #7)
Introduction to Domain Driven Design (Webtlak #7)Introduction to Domain Driven Design (Webtlak #7)
Introduction to Domain Driven Design (Webtlak #7)Adam Štipák
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAdam Štipák
 
from docker run to docker compose (Webelement #36)
from docker run to docker compose (Webelement #36)from docker run to docker compose (Webelement #36)
from docker run to docker compose (Webelement #36)Adam Štipák
 
Docker for local development
Docker for local developmentDocker for local development
Docker for local developmentAdam Štipák
 
Improve your workflow
Improve your workflowImprove your workflow
Improve your workflowAdam Štipák
 
Docker on OSX without pain
Docker on OSX without painDocker on OSX without pain
Docker on OSX without painAdam Štipák
 
Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)Adam Štipák
 
How to be a full stack developer
How to be a full stack developerHow to be a full stack developer
How to be a full stack developerAdam Štipák
 
Independent components in Nette Framework
Independent components in Nette FrameworkIndependent components in Nette Framework
Independent components in Nette FrameworkAdam Štipák
 
Nette framework (WebElement #28)
Nette framework (WebElement #28)Nette framework (WebElement #28)
Nette framework (WebElement #28)Adam Štipák
 
Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Adam Štipák
 
FEI 2013 - Nette framework
FEI 2013 - Nette frameworkFEI 2013 - Nette framework
FEI 2013 - Nette frameworkAdam Štipák
 
FEI - Nette framework
FEI - Nette frameworkFEI - Nette framework
FEI - Nette frameworkAdam Štipák
 

Plus de Adam Štipák (19)

Techforce #5 es in 2018
Techforce #5   es in 2018Techforce #5   es in 2018
Techforce #5 es in 2018
 
Rubyslava #66 (container edition)
Rubyslava #66 (container edition) Rubyslava #66 (container edition)
Rubyslava #66 (container edition)
 
FEI Bratislava 2017 - Docker
FEI Bratislava 2017 - DockerFEI Bratislava 2017 - Docker
FEI Bratislava 2017 - Docker
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?
 
Introduction to Domain Driven Design (Webtlak #7)
Introduction to Domain Driven Design (Webtlak #7)Introduction to Domain Driven Design (Webtlak #7)
Introduction to Domain Driven Design (Webtlak #7)
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
from docker run to docker compose (Webelement #36)
from docker run to docker compose (Webelement #36)from docker run to docker compose (Webelement #36)
from docker run to docker compose (Webelement #36)
 
Docker for local development
Docker for local developmentDocker for local development
Docker for local development
 
Improve your workflow
Improve your workflowImprove your workflow
Improve your workflow
 
Docker on OSX without pain
Docker on OSX without painDocker on OSX without pain
Docker on OSX without pain
 
Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)
 
How to be a full stack developer
How to be a full stack developerHow to be a full stack developer
How to be a full stack developer
 
Independent components in Nette Framework
Independent components in Nette FrameworkIndependent components in Nette Framework
Independent components in Nette Framework
 
Nette framework (WebElement #28)
Nette framework (WebElement #28)Nette framework (WebElement #28)
Nette framework (WebElement #28)
 
Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)Nette framework (WebElement #27 lightning talk)
Nette framework (WebElement #27 lightning talk)
 
FEI 2013 - Nette framework
FEI 2013 - Nette frameworkFEI 2013 - Nette framework
FEI 2013 - Nette framework
 
Why PhpStorm?
Why PhpStorm?Why PhpStorm?
Why PhpStorm?
 
FEI - Nette framework
FEI - Nette frameworkFEI - Nette framework
FEI - Nette framework
 
DP1
DP1DP1
DP1
 

Dernier

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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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 challengesrafiqahmad00786416
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

One page app with AngularJS

  • 1. ONE PAGE APP WITH adam.stipak@gmail.com | @new_POPE
  • 2. WTF, WHICH TOOL I NEED ??? Backbone.js Ember.js Google Closure Spine jQuery (non FW) Este.js (Is it not dead? ;-)) ... No thanks, AngularJS is cool ;-)
  • 3. WHY ? Bootstrapping Module based Templates 2-way data binding (It's fucking good) Dependency Injection Routing Directives
  • 4. BOOTSTRAPPING Step 1: <citsc"i/saglrmnj"<srp> srp r=lbj/nua.i.s>/cit Step 2: <tln-p> hm gap Result: {12}i 3 {+} s I'm using this way (RequireJS) vrap=aglrmdl(ap,[*dp *]; a p nua.oue'p' / es /) aglrbosrpdcmn,[ap]; nua.otta(ouet 'p')
  • 5. MODULE BASED HTML <tln-p=mAp> hm gap"yp" JS vrmAp=aglrmdl(mAp,[) / N dp. a yp nua.oue'yp' ]; / o es / Cleto o U drcie. / olcin f I ietvs aglrmdl(uDrcie' [*.*]; nua.oue'iietvs, /../) vrmAp=aglrmdl(mAp,[uDrcie') a yp nua.oue'yp' 'iietvs];
  • 6. TEMPLATES <l u> <in-eet"tmi [wb,'lmn' '1'" l grpa=ie n 'e' eeet, #4]> {ie} {tm} <l> /i <dv /i> web element #14
  • 7. WITH CONTROLLERS JS mApcnrle(Tmltsotolr,fnto(soe { yp.otolr'epaeCnrle' ucin$cp) $cp.tm =[wb,'lmn' '1'; soeies 'e' eeet, #4] }; ) Template <i n-otolr"epaeCnrle" dv gcnrle=Tmltsotolr> <pnn-eet"tmi ies> sa grpa=ie n tm" {ie}<ml>{idx}/ml> {tm}sal{$ne}<sal <sa> /pn <dv /i> Result web 0 element 1 #14 2
  • 8. ASYNC TEMPLATES <i n-iw <- Ol oeo tepg -> dv gve> !- ny n n h ae - But, you can use this <i n-nld=tmltsfohm" dv gicue"epae/o.tl> with nested levels ;-) AngularJS loads the templates asynchronously.
  • 9. 2-WAY DATA BINDING Controller $cp.nu ="; soeipt " $cp.laIpt=fnto( { soecernu ucin) $cp.nu ="; soeipt " }; Template <nu n-oe=ipt> ipt gmdl"nu" <nu n-lc=cernu("tp=bto"vle"la!> ipt gcik"laIpt) ye"utn au=Cer" Result Clear! $scope.input = ""
  • 10. HOW IT WORKS? ONE WAY DATA BINGING
  • 11. HOW IT WORKS? TWO IS MORE THAN ONE, BRO
  • 12. HOW IT WORKS? SCOPES
  • 13. DEPENDENCY INJECTION Dependecny injector is better than Chuck N. mApsrie'yevc' fnto( {*.*}; yp.evc(mSrie, ucin) /../) mApcnrle(SmIesotolr,fnto(yevc){ yp.otolr'oetmCnrle' ucinmSrie / mSriewsatmtclyijce / yevc a uoaial netd mSriegt'oept'.ucs(ucindt){ yevc.e(sm/ah)scesfnto(aa $cp.tm =dt.tm; soeies aaies }; ) }; )
  • 15. ROUTING $routeProvider mApcni('ruervdr,fnto(r){ yp.ofg[$otPoie' ucin$p $p r .hn'fo,{ we(/o' tmltUl 'p/o.tl, epaer: tlfohm' cnrle:Footolr otolr oCnrle }) .tews(rdrcT:'br}; ohrie{eieto /a') }) ];
  • 16. DIRECTIVES It's all about directives. mApdrcie'ldr,fnto( { yp.ietv(sie' ucin) rtr { eun ln:fnto(cp,eeet ats { ik ucinsoe lmn, tr) $eeet.ldr) (lmn)sie(; } } }; ) Value of slider: 5
  • 17. and so much more on angularjs.org Thanks for coming @new_POPE | newpope.org