Angular Js

6
AngularJS Developer(s) Brat Tech LLC, Google and community. Initial release 2009 Stable release 1.4.3 / July 15, 2015 Development status Active Written in JavaScript Platform Crossplatform, see Legacy browser support Size 142 KiB production 1014 KiB development Type JavaScript library License MIT License Website angularjs.org (http://angularjs.org) AngularJS From Wikipedia, the free encyclopedia In software development, AngularJS (commonly referred to as " Angular ") is an opensource web application framework maintained by Google and by a community of individual developers and corporations to address many of the challenges encountered in developing singlepage applications. It aims to simplify both the development and the testing of such applications by providing a framework for clientside model–view–controller (MVC) and modelview viewmodel (MVVM) architectures, along with components commonly used in rich Internet applications. The AngularJS library works by first reading the HTML page, which has embedded into it additional custom tag attributes. Angular interprets those attributes as directives to bind input or output parts of the page to a model that is represented by standard JavaScript variables. The values of those JavaScript variables can be manually set within the code, or retrieved from static or dynamic JSON resources. According to JavaScript analytics service Libscore, AngularJS is used on the websites of NBC, Walgreens, Intel, Sprint, ABC News, and approximately 8,400 other sites out of 1 million tested in July 2015. [1] Contents 1 Philosophy 2 Scope 3 Bootstrapper 4 Twoway data binding 5 Development history 5.1 Releases 5.2 Legacy browser support 6 Chrome plugin 7 See also 8 References 9 Further reading 10 External links Philosophy

description

Angularjs wiki

Transcript of Angular Js

  • AngularJS

    Developer(s) BratTechLLC,Googleandcommunity.

    Initialrelease 2009

    Stablerelease 1.4.3/July15,2015

    Developmentstatus Active

    Writtenin JavaScript

    Platform Crossplatform,seeLegacybrowsersupport

    Size 142KiBproduction1014KiBdevelopment

    Type JavaScriptlibrary

    License MITLicense

    Website angularjs.org(http://angularjs.org)

    AngularJSFromWikipedia,thefreeencyclopedia

    Insoftwaredevelopment,AngularJS(commonlyreferredtoas"Angular")isanopensourcewebapplicationframeworkmaintainedbyGoogleandbyacommunityofindividualdevelopersandcorporationstoaddressmanyofthechallengesencounteredindevelopingsinglepageapplications.Itaimstosimplifyboththedevelopmentandthetestingofsuchapplicationsbyprovidingaframeworkforclientsidemodelviewcontroller(MVC)andmodelviewviewmodel(MVVM)architectures,alongwithcomponentscommonlyusedinrichInternetapplications.

    TheAngularJSlibraryworksbyfirstreadingtheHTMLpage,whichhasembeddedintoitadditionalcustomtagattributes.AngularinterpretsthoseattributesasdirectivestobindinputoroutputpartsofthepagetoamodelthatisrepresentedbystandardJavaScriptvariables.ThevaluesofthoseJavaScriptvariablescanbemanuallysetwithinthecode,orretrievedfromstaticordynamicJSONresources.

    AccordingtoJavaScriptanalyticsserviceLibscore,AngularJSisusedonthewebsitesofNBC,Walgreens,Intel,Sprint,ABCNews,andapproximately8,400othersitesoutof1milliontestedinJuly2015.[1]

    Contents

    1Philosophy2Scope3Bootstrapper4Twowaydatabinding5Developmenthistory

    5.1Releases5.2Legacybrowsersupport

    6Chromeplugin7Seealso8References9Furtherreading10Externallinks

    Philosophy

  • AngularJSisbuiltaroundthebeliefthatdeclarativeprogrammingshouldbeusedforbuildinguserinterfacesandconnectingsoftwarecomponents,whileimperativeprogrammingisbettersuitedtodefininganapplication'sbusinesslogic.[2]TheframeworkadaptsandextendstraditionalHTMLtopresentdynamiccontentthroughtwowaydatabindingthatallowsfortheautomaticsynchronizationofmodelsandviews.Asaresult,AngularJSdeemphasizesexplicitDOMmanipulationwiththegoalofimprovingtestabilityandperformance.

    AngularJS'sdesigngoalsinclude:

    todecoupleDOMmanipulationfromapplicationlogic.Thedifficultyofthisisdramaticallyaffectedbythewaythecodeisstructured.todecoupletheclientsideofanapplicationfromtheserverside.Thisallowsdevelopmentworktoprogressinparallel,andallowsforreuseofbothsides.toprovidestructureforthejourneyofbuildinganapplication:fromdesigningtheUI,throughwritingthebusinesslogic,totesting.

    AngularimplementstheMVCpatterntoseparatepresentation,data,andlogiccomponents.Usingdependencyinjection,Angularbringstraditionallyserversideservices,suchasviewdependentcontrollers,toclientsidewebapplications.Consequently,muchoftheburdenontheservercanbereduced.

    Scope

    Angularusesthetermscopeinamannerakintothefundamentalsofcomputerscience.

    Scopeincomputersciencedescribeswhenintheprogramaparticularbindingisvalid.TheECMA262specificationdefinesscopeas:alexicalenvironmentinwhichaFunctionobjectisexecutedinclientsidewebscripts[3]akintohowscopeisdefinedinlambdacalculus.[4]

    InAngular,scopeisacertainkindofobject[5]thatitselfcanbeinscopeoroutofscopeinanygivenpartoftheprogram,followingtheusualrulesofvariablescopeinJavaScriptlikeanyotherobject.[6]Whenthetermscopeisusedbelow,itreferstotheAngularscopeobjectandnotthescopeofanamebinding.

    Bootstrapper

    ThetasksperformedbytheAngularJSbootstrapperoccurinthreephases[7]aftertheDOMhasbeenloaded:

    1. CreationofanewInjector2. CompilationofthedirectivesthatdecoratetheDOM3. Linkingofalldirectivestoscope

    AngularJSdirectivesallowthedevelopertospecifycustomandreusableHTMLlikeelementsandattributesthatdefinedatabindingsandthebehaviorofpresentationcomponents.Someofthemostcommonlyuseddirectivesare:

    ngappDeclarestherootelementofanAngularJSapplication,underwhichdirectivescanbeusedtodeclarebindingsanddefinebehavior.

    ngbindSetsthetextofaDOMelementtothevalueofanexpression.Forexample,willdisplaythevalueofnameinsidethespanelement.Anychangestothevariablenameinthe

  • application'sscopearereflectedinstantlyintheDOM.ngmodel

    Similartongbind,butestablishesatwowaydatabindingbetweentheviewandthescope.ngmodeloptions

    Allowstuninghowmodelupdatesaredone.ngclass

    Allowsclassattributestobedynamicallyloaded.ngcontroller

    SpecifiesaJavaScriptcontrollerclassthatevaluatesHTMLexpressions.ngrepeat

    Instantiateanelementonceperitemfromacollection.ngshow&nghide

    Conditionallyshoworhideanelement,dependingonthevalueofabooleanexpression.ShowandhideisachievedbysettingtheCSSdisplaystyle.

    ngswitchConditionallyinstantiateonetemplatefromasetofchoices,dependingonthevalueofaselectionexpression.

    ngviewThebasedirectiveresponsibleforhandlingroutesthatresolveJSONbeforerenderingtemplatesdrivenbyspecifiedcontrollers.

    ngifBasicifstatementdirectivethatallowtoshowthefollowingelementiftheconditionsaretrue.Whentheconditionisfalse,theelementisremovedfromtheDOM.Whentrue,acloneofthecompiledelementisreinserted

    ngariaAmoduleforaccessibilitysupportofcommonARIAattributes.

    nganimateAmoduleprovidessupportforJavaScript,CSS3transitionandCSS3keyframeanimationhookswithinexistingcoreandcustomdirectives.

    Twowaydatabinding

    AngularJS'twowaydatabindingisitsmostnotablefeature,anditreducesthecomplexityofcodewithrelieftotheserverbackendoftemplatingresponsibilities.Instead,templatesarerenderedinplainHTMLaccordingtodatacontainedinascopedefinedinthemodel.The$scopeserviceinAngulardetectschangestothemodelsectionandmodifiesHTMLexpressionsintheviewviaacontroller.Likewise,anyalterationstotheviewarereflectedinthemodel.ThiscircumventstheneedtoactivelymanipulatetheDOMandencouragesbootstrappingandrapidprototypingofwebapplications.[8]AngularJSdetectschangesinmodelsbycomparingthecurrentvalueswithvaluesstoredearlierinaprocessofdirtychecking,unlikeEmber.jsandBackbone.jsthattriggerlistenerswhenthemodelvaluesarechanged.[9]

    Developmenthistory

    AngularJSwasoriginallydevelopedin2009byAdamAbrons[10]atBratTechLLC[11]asthesoftwarebehindanonlineJSONstorageservice,thatwouldhavebeenpricedbythemegabyte,foreasytomakeapplicationsfortheenterprise.Thisventurewaslocatedatthewebdomain"GetAngular.com",[11]andhadafewsubscribers,beforethetwodecidedtoabandonthebusinessideaandreleaseAngularasanopensourcelibrary.

  • Abronslefttheproject,butHevery,whoworksatGoogle,continuestodevelopandmaintainthelibrarywithfellowGoogleemployeesIgorMinrandVojtaJna.[12]

    Releases

    AsofJuly15,2015,release1.4.3(codenamefoamacceleration(https://github.com/angular/angular.js/blob/master/CHANGELOG.md#1.4.3))isthecurrentstableversion.

    Thecodenamesaresuperpowerrelated,composedoftwohyphenjoinedwords,shouldsoundfun/crazy/cool,andarepubliclysubmittedandvotedbyusers.[13]

    Legacybrowsersupport

    Versions1.2andlaterofAngularJSdonotsupportInternetExplorerversions6or7.[14]Versions1.3andlaterofAngularJSdroppedsupportforInternetExplorer8.[15]

    Chromeplugin

    InJuly2012,theAngularteambuiltapluginfortheGoogleChromebrowsercalledBatarang(https://chrome.google.com/webstore/detail/ighdmehidhipcmcojjgiloacoafjmpfk),[16]thatimprovesthedebuggingexperienceforwebapplicationsbuiltwithAngular.TheextensionaimstoallowforeasydetectionofperformancebottlenecksandoffersaGUIfordebuggingapplications.[17]Theextensionisnotcompatiblewithrecentreleases(afterv1.2.x)ofAngular.[18]

    Seealso

    Backbone.jsEmber.jsKnockout.jsMEAN(softwarebundle)React.js

    References1. http://libscore.com/?#angular2. "WhatIsAngular?"(http://docs.angularjs.org/guide/introduction).Retrieved12February2013.3. "AnnotatedECMAScript5.1,Section10.2LexicalEnvironments"(http://es5.github.io/#x10.2).Retrieved

    20150103.4. Barendregt,HenkBarendsen,Erik(March2000),IntroductiontoLambdaCalculus

    (ftp://ftp.cs.ru.nl/pub/CompMath.Found/lambda.pdf)(PDF)5. "AngularJS:DeveloperGuide:Scopes"(https://docs.angularjs.org/guide/scope).Retrieved20150103.6. "ECMA2623indetail.Chapter4.Scopechain."(http://dmitrysoshnikov.com/ecmascript/chapter4scopechain/).

    Retrieved20150103.7. "WritingDirectives"(http://www.youtube.com/watch?v=WqmeI5fZcho&list=TLJUxRYO87UWA).angularjs.org.

    November28,2012.Retrieved20130721.8. "5AwesomeAngularJSFeatures"(http://net.tutsplus.com/tutorials/javascriptajax/5awesomeangularjsfeatures/).

  • WikimediaCommonshasmediarelatedtoAngularJS.

    Retrieved13February2013.9. MiskoHevery."Databindinginangularjs"(http://stackoverflow.com/a/9693933/146423).Retrieved20140309.

    10. "HelloWorld,ishere"(http://misko.hevery.com/2009/09/28/helloworldangularishere/).Retrieved20141012.

    11. "GetAngular"(http://web.archive.org/web/20100413141437/http://getangular.com/).Angular/BRATTech.LLC.Retrieved20141012.

    12. "Contributorstoangular/angular.js(GitHub)"(https://github.com/angular/angular.js/graphs/contributors).Retrieved20141012.

    13. "AngularJSCodeNamesGoogleModerator"(https://www.google.com/moderator/#16/e=a62cb).Google.Retrieved20141012.

    14. "AngularJS:DeveloperGuide:InternetExplorerCompatibility"(https://docs.angularjs.org/guide/ie).Google.Retrieved20141012.

    15. Minar,Igor."AngularJS1.3:anewreleaseapproaches"(http://angularjs.blogspot.com/2013/12/angularjs13newreleaseapproaches.html).AngularJSBlog.Retrieved20141012.

    16. "angular/angularjsbatarang(GitHub)"(https://github.com/angular/angularjsbatarang).Retrieved20141012.17. Ford,Brian."IntroducingtheAngularJSBatarang"(http://angularjs.blogspot.com/2012/07/introducingangularjs

    batarang.html).AngularJSBlog.Retrieved20141012.18. "batarangChromeextensionforAngularJSappearsbroken"

    (http://stackoverflow.com/questions/23506526/batarangchromeextensionforangularjsappearsbroken).

    FurtherreadingGreen,BradSeshadri,Shyam(March22,2013).AngularJS(http://shop.oreilly.com/product/0636920028055.do)(1sted.).O'ReillyMedia.p.150.ISBN9781449344856.Kozlowski,PawelDarwin,PeterBacon(August23,2013).MasteringWebApplicationDevelopmentwithAngularJS(http://www.packtpub.com/angularjswebapplicationdevelopment/book)(1sted.).PacktPublishing.p.372.ISBN9781782161820.Ruebbelke,Lukas(January1,2015).AngularJSinAction(1sted.).ManningPublications.p.325.ISBN9781617291333.

    Externallinks

    Officialwebsite(http://www.angularjs.org/,%20https://angular.io)Angular2DeveloperPreview(https://angular.io/)AngularJSModulesRepository(http://ngmodules.org/)BuiltwithAngularJS(http://builtwith.angularjs.org/)AngularJSatGoogleGroups(https://groups.google.com/forum/?fromgroups#!forum/angular)AngularJSatGoogle+(https://plus.google.com/+AngularJS/posts)BatarangChromeplugin(https://github.com/angular/angularjsbatarang)NGCONF2014VideosandSlides(http://ngconf.nglearn.org/)NGEUROPE2014VideosandSlides(http://nglearn.org/2014/11/NGEUROPE2014/#)NGCONF2015VideosandSlides(https://medium.com/angularjsmeetupsouthlondon/angularngconf2015media25dbe6250154)AngularJSDeveloperCommunity(http://angularspot.com)ComparisonofAngularJSapplicationstarters(http://www.dancancro.com/comparisonofangularjsapplicationstarters/)AngularJSMeetupGroups(http://www.meetup.com/find/?allMeetups=false&keywords=angularjs&radius=Infinity&sort=member_count)

    Retrievedfrom"https://en.wikipedia.org/w/index.php?title=AngularJS&oldid=673641778"

  • Categories: JavaScriptlibraries Ajax(programming) Googlesoftware RichInternetapplicationframeworksSoftwareusingtheMITlicense

    Thispagewaslastmodifiedon29July2015,at14:40.TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmayapply.Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.WikipediaisaregisteredtrademarkoftheWikimediaFoundation,Inc.,anonprofitorganization.