├── .editorconfig ├── .gitattributes ├── .gitignore ├── .jscs.json ├── .jscs.json.todo ├── .jshintignore ├── .jshintrc ├── .jshintrc-base ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.closure.md ├── README.md ├── TRIAGING.md ├── angularFiles.js ├── benchmarks ├── README.md ├── event-delegation-bp │ ├── app.js │ ├── bp.conf.js │ └── main.html ├── largetable-bp │ ├── app.js │ ├── bp.conf.js │ ├── jquery-noop.js │ └── main.html ├── ng-options-bp │ ├── app.js │ ├── bp.conf.js │ └── main.html ├── orderby-bp │ ├── app.js │ ├── bp.conf.js │ └── main.html └── parsed-expressions-bp │ ├── app.js │ ├── bp.conf.js │ └── main.html ├── bower.json ├── changelog.js ├── changelog.spec.js ├── check-size.sh ├── compare-master-to-stable.js ├── css ├── angular-scenario.css └── angular.css ├── docs ├── app │ ├── assets │ │ ├── Error404.html │ │ ├── css │ │ │ ├── animations.css │ │ │ ├── doc_widgets.css │ │ │ ├── docs.css │ │ │ ├── prettify-theme.css │ │ │ └── prettify.css │ │ ├── favicon.ico │ │ ├── img │ │ │ ├── AngularJS-small.png │ │ │ ├── angularjs-for-header-only.svg │ │ │ ├── bullet.png │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ └── js │ │ │ ├── angular-bootstrap │ │ │ ├── bootstrap.js │ │ │ └── dropdown-toggle.js │ │ │ └── search-worker.js │ ├── e2e │ │ ├── .jshintrc │ │ ├── api-docs │ │ │ ├── api-pages.scenario.js │ │ │ ├── provider-pages.scenario.js │ │ │ └── service-pages.scenario.js │ │ └── app.scenario.js │ ├── src │ │ ├── app.js │ │ ├── directives.js │ │ ├── docs.js │ │ ├── errors.js │ │ ├── examples.js │ │ ├── search.js │ │ ├── tutorials.js │ │ └── versions.js │ └── test │ │ ├── directivesSpec.js │ │ └── docsSpec.js ├── bower.json ├── config │ ├── ignore.words │ ├── index.js │ ├── inline-tag-defs │ │ └── type.js │ ├── processors │ │ ├── error-docs.js │ │ ├── index-page.js │ │ ├── keywords.js │ │ ├── pages-data.js │ │ └── versions-data.js │ ├── services │ │ ├── deployments │ │ │ ├── debug.js │ │ │ ├── default.js │ │ │ ├── jquery.js │ │ │ └── production.js │ │ ├── errorNamespaceMap.js │ │ ├── getMinerrInfo.js │ │ ├── getVersion.js │ │ └── gitData.js │ ├── tag-defs │ │ ├── sortOrder.js │ │ └── tutorial-step.js │ └── templates │ │ ├── error.template.html │ │ ├── errorNamespace.template.html │ │ ├── indexPage.template.html │ │ ├── json-doc.template.json │ │ ├── nav-data.template.js │ │ ├── pages-data.template.js │ │ ├── runnableExample.template.html │ │ ├── tutorial.template.html │ │ └── versions-data.template.js ├── content │ ├── api │ │ └── index.ngdoc │ ├── error │ │ ├── $animate │ │ │ └── notcsel.ngdoc │ │ ├── $cacheFactory │ │ │ └── iid.ngdoc │ │ ├── $compile │ │ │ ├── ctreq.ngdoc │ │ │ ├── iscp.ngdoc │ │ │ ├── multidir.ngdoc │ │ │ ├── noctrl.ngdoc │ │ │ ├── nodomevents.ngdoc │ │ │ ├── noident.ngdoc │ │ │ ├── nonassign.ngdoc │ │ │ ├── selmulti.ngdoc │ │ │ ├── tpload.ngdoc │ │ │ ├── tplrt.ngdoc │ │ │ └── uterdir.ngdoc │ │ ├── $controller │ │ │ ├── ctrlfmt.ngdoc │ │ │ └── noscp.ngdoc │ │ ├── $http │ │ │ └── badreq.ngdoc │ │ ├── $injector │ │ │ ├── cdep.ngdoc │ │ │ ├── itkn.ngdoc │ │ │ ├── modulerr.ngdoc │ │ │ ├── nomod.ngdoc │ │ │ ├── pget.ngdoc │ │ │ ├── strictdi.ngdoc │ │ │ ├── undef.ngdoc │ │ │ └── unpr.ngdoc │ │ ├── $interpolate │ │ │ ├── interr.ngdoc │ │ │ └── noconcat.ngdoc │ │ ├── $location │ │ │ ├── ipthprfx.ngdoc │ │ │ ├── isrcharg.ngdoc │ │ │ ├── nobase.ngdoc │ │ │ └── nostate.ngdoc │ │ ├── $parse │ │ │ ├── isecdom.ngdoc │ │ │ ├── isecff.ngdoc │ │ │ ├── isecfld.ngdoc │ │ │ ├── isecfn.ngdoc │ │ │ ├── isecobj.ngdoc │ │ │ ├── isecwindow.ngdoc │ │ │ ├── lexerr.ngdoc │ │ │ ├── syntax.ngdoc │ │ │ └── ueoe.ngdoc │ │ ├── $q │ │ │ ├── norslvr.ngdoc │ │ │ └── qcycle.ngdoc │ │ ├── $resource │ │ │ ├── badargs.ngdoc │ │ │ ├── badcfg.ngdoc │ │ │ ├── badmember.ngdoc │ │ │ └── badname.ngdoc │ │ ├── $rootScope │ │ │ ├── infdig.ngdoc │ │ │ └── inprog.ngdoc │ │ ├── $sanitize │ │ │ └── badparse.ngdoc │ │ ├── $sce │ │ │ ├── icontext.ngdoc │ │ │ ├── iequirks.ngdoc │ │ │ ├── imatcher.ngdoc │ │ │ ├── insecurl.ngdoc │ │ │ ├── itype.ngdoc │ │ │ ├── iwcard.ngdoc │ │ │ └── unsafe.ngdoc │ │ ├── filter │ │ │ └── notarray.ngdoc │ │ ├── index.ngdoc │ │ ├── jqLite │ │ │ ├── nosel.ngdoc │ │ │ ├── offargs.ngdoc │ │ │ └── onargs.ngdoc │ │ ├── ng │ │ │ ├── areq.ngdoc │ │ │ ├── badname.ngdoc │ │ │ ├── btstrpd.ngdoc │ │ │ ├── cpi.ngdoc │ │ │ ├── cpta.ngdoc │ │ │ ├── cpws.ngdoc │ │ │ └── test.ngdoc │ │ ├── ngModel │ │ │ ├── constexpr.ngdoc │ │ │ ├── datefmt.ngdoc │ │ │ └── nonassign.ngdoc │ │ ├── ngOptions │ │ │ ├── iexp.ngdoc │ │ │ └── trkslct.ngdoc │ │ ├── ngPattern │ │ │ └── noregexp.ngdoc │ │ ├── ngRepeat │ │ │ ├── badident.ngdoc │ │ │ ├── dupes.ngdoc │ │ │ ├── iexp.ngdoc │ │ │ └── iidexp.ngdoc │ │ └── ngTransclude │ │ │ └── orphan.ngdoc │ ├── guide │ │ ├── $location.ngdoc │ │ ├── accessibility.ngdoc │ │ ├── animations.ngdoc │ │ ├── bootstrap.ngdoc │ │ ├── compiler.ngdoc │ │ ├── concepts.ngdoc │ │ ├── controller.ngdoc │ │ ├── css-styling.ngdoc │ │ ├── databinding.ngdoc │ │ ├── di.ngdoc │ │ ├── directive.ngdoc │ │ ├── e2e-testing.ngdoc │ │ ├── expression.ngdoc │ │ ├── filter.ngdoc │ │ ├── forms.ngdoc │ │ ├── i18n.ngdoc │ │ ├── ie.ngdoc │ │ ├── index.ngdoc │ │ ├── introduction.ngdoc │ │ ├── migration.ngdoc │ │ ├── module.ngdoc │ │ ├── production.ngdoc │ │ ├── providers.ngdoc │ │ ├── scope.ngdoc │ │ ├── security.ngdoc │ │ ├── services.ngdoc │ │ ├── templates.ngdoc │ │ └── unit-testing.ngdoc │ ├── misc │ │ ├── contribute.ngdoc │ │ ├── downloading.ngdoc │ │ ├── faq.ngdoc │ │ ├── index.ngdoc │ │ └── started.ngdoc │ ├── notes │ │ └── empty.tmp │ └── tutorial │ │ ├── index.ngdoc │ │ ├── step_00.ngdoc │ │ ├── step_01.ngdoc │ │ ├── step_02.ngdoc │ │ ├── step_03.ngdoc │ │ ├── step_04.ngdoc │ │ ├── step_05.ngdoc │ │ ├── step_06.ngdoc │ │ ├── step_07.ngdoc │ │ ├── step_08.ngdoc │ │ ├── step_09.ngdoc │ │ ├── step_10.ngdoc │ │ ├── step_11.ngdoc │ │ ├── step_12.ngdoc │ │ └── the_end.ngdoc ├── gulpfile.js ├── img │ ├── One_Way_Data_Binding.png │ ├── Two_Way_Data_Binding.png │ ├── angular_parts.png │ ├── form_data_flow.png │ ├── guide │ │ ├── concepts-databinding1.png │ │ ├── concepts-databinding2.png │ │ ├── concepts-directive.png │ │ ├── concepts-module-injector.png │ │ ├── concepts-module-service.png │ │ ├── concepts-runtime.png │ │ ├── concepts-scope-watch-strategies.png │ │ ├── concepts-scope.png │ │ ├── concepts-startup.png │ │ ├── concepts-view.png │ │ ├── di_sequence_final.png │ │ ├── dom_scope_final.png │ │ ├── forms-debounce.gif │ │ ├── forms-update-on-blur.gif │ │ ├── hashbang_vs_regular_url.jpg │ │ ├── scenario_runner.png │ │ └── simple_scope_final.png │ ├── helloworld.png │ ├── helloworld_2way.png │ └── tutorial │ │ ├── catalog_screen.png │ │ ├── tutorial_00.png │ │ ├── tutorial_00_final.png │ │ ├── tutorial_02.png │ │ ├── tutorial_03.png │ │ ├── tutorial_04.png │ │ ├── tutorial_05.png │ │ ├── tutorial_05.pptx │ │ ├── tutorial_07_final.png │ │ ├── tutorial_08-09_final.png │ │ ├── tutorial_10-11_final.png │ │ └── xhr_service_final.png └── protractor-conf.js ├── gdocs.js ├── i18n ├── README.md ├── closure │ ├── currencySymbols.js │ ├── datetimeSymbols.js │ ├── datetimeSymbolsExt.js │ ├── numberSymbols.js │ ├── numberSymbolsExt.js │ └── pluralRules.js ├── e2e │ ├── i18n-e2e.js │ ├── localeTest_cs.html │ ├── localeTest_de.html │ ├── localeTest_en.html │ ├── localeTest_es.html │ ├── localeTest_sk.html │ ├── localeTest_zh.html │ └── runner.html ├── generate.sh ├── run-tests.sh ├── spec │ ├── closureI18nExtractorSpec.js │ ├── converterSpec.js │ ├── parserSpec.js │ └── utilSpec.js ├── src │ ├── closureI18nExtractor.js │ ├── closureSlurper.js │ ├── converter.js │ ├── parser.js │ └── util.js └── update-closure.sh ├── images ├── css │ ├── arrow_left.gif │ ├── arrow_right.gif │ └── indicator-wait.png ├── docs │ ├── Diagrams.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ ├── image1.png │ │ ├── image2.png │ │ ├── image4.png │ │ ├── image8.png │ │ └── image9.png │ ├── guide │ │ ├── about_controller.graffle │ │ ├── about_model.graffle │ │ ├── concepts.graffle │ │ │ ├── data.plist │ │ │ ├── image1.png │ │ │ ├── image4.png │ │ │ └── image5.png │ │ ├── di_sequence.graffle │ │ ├── dom_scope.graffle │ │ ├── form_data_flow.graffle │ │ ├── hashbang_vs_regular_url.graffle │ │ └── simple_scope.graffle │ │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ │ ├── data.plist │ │ │ └── image7.png │ └── tutorial │ │ ├── di_sequence.graffle │ │ ├── simple_scope.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ └── image7.png │ │ ├── tutorial_00.graffle │ │ ├── tutorial_02.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ └── image11.png │ │ ├── tutorial_03.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ └── image13.png │ │ ├── tutorial_04.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ └── image15.png │ │ ├── tutorial_07.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ └── image9.png │ │ ├── tutorial_08-09.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ └── image10.png │ │ ├── tutorial_10-11.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ └── image10.png │ │ ├── tutorial_proto.graffle │ │ ├── QuickLook │ │ │ ├── Preview.pdf │ │ │ └── Thumbnail.tiff │ │ ├── data.plist │ │ └── image7.png │ │ └── xhr_service.graffle ├── favicon.ico └── logo │ ├── AngularJS-Shield.exports │ ├── AngularJS-Shield-huge.png │ ├── AngularJS-Shield-large.png │ ├── AngularJS-Shield-medium.png │ ├── AngularJS-Shield-small.png │ ├── AngularJS-Shield.eps │ └── AngularJS-Shield.pdf │ ├── AngularJS-Shield.graffle │ ├── AngularJS.exports │ ├── AngularJS-huge.png │ ├── AngularJS-large.png │ ├── AngularJS-medium.png │ ├── AngularJS-small.png │ ├── AngularJS.eps │ └── AngularJS.pdf │ └── AngularJS.graffle │ ├── data.plist │ ├── image1.png │ └── image2.png ├── init-repo.sh ├── jenkins_build.sh ├── karma-docs.conf.js ├── karma-jqlite.conf.js ├── karma-jquery.conf.js ├── karma-modules.conf.js ├── karma-shared.conf.js ├── lib ├── browserstack │ ├── start_tunnel.js │ └── start_tunnel.sh ├── grunt │ ├── plugins.js │ └── utils.js ├── htmlparser │ └── htmlparser.js ├── promises-aplus │ └── promises-aplus-test-adapter.js ├── saucelabs │ └── start_tunnel.sh └── versions │ └── version-info.js ├── logs └── .gitignore ├── npm-shrinkwrap.clean.json ├── npm-shrinkwrap.json ├── package.json ├── protractor-conf.js ├── protractor-jenkins-conf.js ├── protractor-shared-conf.js ├── protractor-travis-conf.js ├── scripts ├── angular.js │ ├── tag-release.sh │ └── untag-release.sh ├── bower │ ├── publish.sh │ └── unpublish.sh ├── code.angularjs.org │ ├── publish.sh │ └── unpublish.sh ├── jenkins │ ├── master.sh │ ├── release.sh │ └── undo-release.sh ├── npm │ ├── clean-shrinkwrap.js │ └── install-dependencies.sh ├── travis │ ├── build.sh │ ├── npm-bundle-deps.sh │ ├── print_logs.sh │ ├── start_browser_provider.sh │ └── wait_for_browser_provider.sh └── utils.inc ├── src ├── .jshintrc ├── Angular.js ├── AngularPublic.js ├── angular.prefix ├── angular.suffix ├── apis.js ├── auto │ └── injector.js ├── jqLite.js ├── loader.js ├── loader.prefix ├── loader.suffix ├── minErr.js ├── module.prefix ├── module.suffix ├── ng │ ├── anchorScroll.js │ ├── animate.js │ ├── asyncCallback.js │ ├── browser.js │ ├── cacheFactory.js │ ├── compile.js │ ├── controller.js │ ├── directive │ │ ├── a.js │ │ ├── attrs.js │ │ ├── directives.js │ │ ├── form.js │ │ ├── input.js │ │ ├── ngBind.js │ │ ├── ngChange.js │ │ ├── ngClass.js │ │ ├── ngCloak.js │ │ ├── ngController.js │ │ ├── ngCsp.js │ │ ├── ngEventDirs.js │ │ ├── ngIf.js │ │ ├── ngInclude.js │ │ ├── ngInit.js │ │ ├── ngList.js │ │ ├── ngModel.js │ │ ├── ngNonBindable.js │ │ ├── ngOptions.js │ │ ├── ngPluralize.js │ │ ├── ngRepeat.js │ │ ├── ngShowHide.js │ │ ├── ngStyle.js │ │ ├── ngSwitch.js │ │ ├── ngTransclude.js │ │ ├── script.js │ │ ├── select.js │ │ ├── style.js │ │ └── validators.js │ ├── document.js │ ├── exceptionHandler.js │ ├── filter.js │ ├── filter │ │ ├── filter.js │ │ ├── filters.js │ │ ├── limitTo.js │ │ └── orderBy.js │ ├── http.js │ ├── httpBackend.js │ ├── interpolate.js │ ├── interval.js │ ├── locale.js │ ├── location.js │ ├── log.js │ ├── parse.js │ ├── q.js │ ├── raf.js │ ├── rootElement.js │ ├── rootScope.js │ ├── sanitizeUri.js │ ├── sce.js │ ├── sniffer.js │ ├── templateRequest.js │ ├── testability.js │ ├── timeout.js │ ├── urlUtils.js │ └── window.js ├── ngAnimate │ ├── .jshintrc │ └── animate.js ├── ngAria │ └── aria.js ├── ngCookies │ ├── .jshintrc │ └── cookies.js ├── ngLocale │ ├── .jshintrc │ ├── angular-locale_aa-dj.js │ ├── angular-locale_aa-er.js │ ├── angular-locale_aa-et.js │ ├── angular-locale_aa.js │ ├── angular-locale_af-na.js │ ├── angular-locale_af-za.js │ ├── angular-locale_af.js │ ├── angular-locale_agq-cm.js │ ├── angular-locale_agq.js │ ├── angular-locale_ak-gh.js │ ├── angular-locale_ak.js │ ├── angular-locale_am-et.js │ ├── angular-locale_am.js │ ├── angular-locale_ar-001.js │ ├── angular-locale_ar-ae.js │ ├── angular-locale_ar-bh.js │ ├── angular-locale_ar-dj.js │ ├── angular-locale_ar-dz.js │ ├── angular-locale_ar-eg.js │ ├── angular-locale_ar-eh.js │ ├── angular-locale_ar-er.js │ ├── angular-locale_ar-il.js │ ├── angular-locale_ar-iq.js │ ├── angular-locale_ar-jo.js │ ├── angular-locale_ar-km.js │ ├── angular-locale_ar-kw.js │ ├── angular-locale_ar-lb.js │ ├── angular-locale_ar-ly.js │ ├── angular-locale_ar-ma.js │ ├── angular-locale_ar-mr.js │ ├── angular-locale_ar-om.js │ ├── angular-locale_ar-ps.js │ ├── angular-locale_ar-qa.js │ ├── angular-locale_ar-sa.js │ ├── angular-locale_ar-sd.js │ ├── angular-locale_ar-so.js │ ├── angular-locale_ar-ss.js │ ├── angular-locale_ar-sy.js │ ├── angular-locale_ar-td.js │ ├── angular-locale_ar-tn.js │ ├── angular-locale_ar-ye.js │ ├── angular-locale_ar.js │ ├── angular-locale_as-in.js │ ├── angular-locale_as.js │ ├── angular-locale_asa-tz.js │ ├── angular-locale_asa.js │ ├── angular-locale_ast-es.js │ ├── angular-locale_ast.js │ ├── angular-locale_az-cyrl-az.js │ ├── angular-locale_az-cyrl.js │ ├── angular-locale_az-latn-az.js │ ├── angular-locale_az-latn.js │ ├── angular-locale_az.js │ ├── angular-locale_bas-cm.js │ ├── angular-locale_bas.js │ ├── angular-locale_be-by.js │ ├── angular-locale_be.js │ ├── angular-locale_bem-zm.js │ ├── angular-locale_bem.js │ ├── angular-locale_bez-tz.js │ ├── angular-locale_bez.js │ ├── angular-locale_bg-bg.js │ ├── angular-locale_bg.js │ ├── angular-locale_bm-latn-ml.js │ ├── angular-locale_bm-latn.js │ ├── angular-locale_bm-ml.js │ ├── angular-locale_bm.js │ ├── angular-locale_bn-bd.js │ ├── angular-locale_bn-in.js │ ├── angular-locale_bn.js │ ├── angular-locale_bo-cn.js │ ├── angular-locale_bo-in.js │ ├── angular-locale_bo.js │ ├── angular-locale_br-fr.js │ ├── angular-locale_br.js │ ├── angular-locale_brx-in.js │ ├── angular-locale_brx.js │ ├── angular-locale_bs-cyrl-ba.js │ ├── angular-locale_bs-cyrl.js │ ├── angular-locale_bs-latn-ba.js │ ├── angular-locale_bs-latn.js │ ├── angular-locale_bs.js │ ├── angular-locale_byn-er.js │ ├── angular-locale_byn.js │ ├── angular-locale_ca-ad.js │ ├── angular-locale_ca-es-valencia.js │ ├── angular-locale_ca-es.js │ ├── angular-locale_ca-fr.js │ ├── angular-locale_ca-it.js │ ├── angular-locale_ca.js │ ├── angular-locale_cgg-ug.js │ ├── angular-locale_cgg.js │ ├── angular-locale_chr-us.js │ ├── angular-locale_chr.js │ ├── angular-locale_ckb-arab-iq.js │ ├── angular-locale_ckb-arab-ir.js │ ├── angular-locale_ckb-arab.js │ ├── angular-locale_ckb-iq.js │ ├── angular-locale_ckb-ir.js │ ├── angular-locale_ckb-latn-iq.js │ ├── angular-locale_ckb-latn.js │ ├── angular-locale_ckb.js │ ├── angular-locale_cs-cz.js │ ├── angular-locale_cs.js │ ├── angular-locale_cy-gb.js │ ├── angular-locale_cy.js │ ├── angular-locale_da-dk.js │ ├── angular-locale_da-gl.js │ ├── angular-locale_da.js │ ├── angular-locale_dav-ke.js │ ├── angular-locale_dav.js │ ├── angular-locale_de-at.js │ ├── angular-locale_de-be.js │ ├── angular-locale_de-ch.js │ ├── angular-locale_de-de.js │ ├── angular-locale_de-li.js │ ├── angular-locale_de-lu.js │ ├── angular-locale_de.js │ ├── angular-locale_dje-ne.js │ ├── angular-locale_dje.js │ ├── angular-locale_dsb-de.js │ ├── angular-locale_dsb.js │ ├── angular-locale_dua-cm.js │ ├── angular-locale_dua.js │ ├── angular-locale_dyo-sn.js │ ├── angular-locale_dyo.js │ ├── angular-locale_dz-bt.js │ ├── angular-locale_dz.js │ ├── angular-locale_ebu-ke.js │ ├── angular-locale_ebu.js │ ├── angular-locale_ee-gh.js │ ├── angular-locale_ee-tg.js │ ├── angular-locale_ee.js │ ├── angular-locale_el-cy.js │ ├── angular-locale_el-gr.js │ ├── angular-locale_el.js │ ├── angular-locale_en-001.js │ ├── angular-locale_en-150.js │ ├── angular-locale_en-ag.js │ ├── angular-locale_en-ai.js │ ├── angular-locale_en-as.js │ ├── angular-locale_en-au.js │ ├── angular-locale_en-bb.js │ ├── angular-locale_en-be.js │ ├── angular-locale_en-bm.js │ ├── angular-locale_en-bs.js │ ├── angular-locale_en-bw.js │ ├── angular-locale_en-bz.js │ ├── angular-locale_en-ca.js │ ├── angular-locale_en-cc.js │ ├── angular-locale_en-ck.js │ ├── angular-locale_en-cm.js │ ├── angular-locale_en-cx.js │ ├── angular-locale_en-dg.js │ ├── angular-locale_en-dm.js │ ├── angular-locale_en-er.js │ ├── angular-locale_en-fj.js │ ├── angular-locale_en-fk.js │ ├── angular-locale_en-fm.js │ ├── angular-locale_en-gb.js │ ├── angular-locale_en-gd.js │ ├── angular-locale_en-gg.js │ ├── angular-locale_en-gh.js │ ├── angular-locale_en-gi.js │ ├── angular-locale_en-gm.js │ ├── angular-locale_en-gu.js │ ├── angular-locale_en-gy.js │ ├── angular-locale_en-hk.js │ ├── angular-locale_en-ie.js │ ├── angular-locale_en-im.js │ ├── angular-locale_en-in.js │ ├── angular-locale_en-io.js │ ├── angular-locale_en-iso.js │ ├── angular-locale_en-je.js │ ├── angular-locale_en-jm.js │ ├── angular-locale_en-ke.js │ ├── angular-locale_en-ki.js │ ├── angular-locale_en-kn.js │ ├── angular-locale_en-ky.js │ ├── angular-locale_en-lc.js │ ├── angular-locale_en-lr.js │ ├── angular-locale_en-ls.js │ ├── angular-locale_en-mg.js │ ├── angular-locale_en-mh.js │ ├── angular-locale_en-mo.js │ ├── angular-locale_en-mp.js │ ├── angular-locale_en-ms.js │ ├── angular-locale_en-mt.js │ ├── angular-locale_en-mu.js │ ├── angular-locale_en-mw.js │ ├── angular-locale_en-my.js │ ├── angular-locale_en-na.js │ ├── angular-locale_en-nf.js │ ├── angular-locale_en-ng.js │ ├── angular-locale_en-nr.js │ ├── angular-locale_en-nu.js │ ├── angular-locale_en-nz.js │ ├── angular-locale_en-pg.js │ ├── angular-locale_en-ph.js │ ├── angular-locale_en-pk.js │ ├── angular-locale_en-pn.js │ ├── angular-locale_en-pr.js │ ├── angular-locale_en-pw.js │ ├── angular-locale_en-rw.js │ ├── angular-locale_en-sb.js │ ├── angular-locale_en-sc.js │ ├── angular-locale_en-sd.js │ ├── angular-locale_en-sg.js │ ├── angular-locale_en-sh.js │ ├── angular-locale_en-sl.js │ ├── angular-locale_en-ss.js │ ├── angular-locale_en-sx.js │ ├── angular-locale_en-sz.js │ ├── angular-locale_en-tc.js │ ├── angular-locale_en-tk.js │ ├── angular-locale_en-to.js │ ├── angular-locale_en-tt.js │ ├── angular-locale_en-tv.js │ ├── angular-locale_en-tz.js │ ├── angular-locale_en-ug.js │ ├── angular-locale_en-um.js │ ├── angular-locale_en-us.js │ ├── angular-locale_en-vc.js │ ├── angular-locale_en-vg.js │ ├── angular-locale_en-vi.js │ ├── angular-locale_en-vu.js │ ├── angular-locale_en-ws.js │ ├── angular-locale_en-za.js │ ├── angular-locale_en-zm.js │ ├── angular-locale_en-zw.js │ ├── angular-locale_en.js │ ├── angular-locale_eo-001.js │ ├── angular-locale_eo.js │ ├── angular-locale_es-419.js │ ├── angular-locale_es-ar.js │ ├── angular-locale_es-bo.js │ ├── angular-locale_es-cl.js │ ├── angular-locale_es-co.js │ ├── angular-locale_es-cr.js │ ├── angular-locale_es-cu.js │ ├── angular-locale_es-do.js │ ├── angular-locale_es-ea.js │ ├── angular-locale_es-ec.js │ ├── angular-locale_es-es.js │ ├── angular-locale_es-gq.js │ ├── angular-locale_es-gt.js │ ├── angular-locale_es-hn.js │ ├── angular-locale_es-ic.js │ ├── angular-locale_es-mx.js │ ├── angular-locale_es-ni.js │ ├── angular-locale_es-pa.js │ ├── angular-locale_es-pe.js │ ├── angular-locale_es-ph.js │ ├── angular-locale_es-pr.js │ ├── angular-locale_es-py.js │ ├── angular-locale_es-sv.js │ ├── angular-locale_es-us.js │ ├── angular-locale_es-uy.js │ ├── angular-locale_es-ve.js │ ├── angular-locale_es.js │ ├── angular-locale_et-ee.js │ ├── angular-locale_et.js │ ├── angular-locale_eu-es.js │ ├── angular-locale_eu.js │ ├── angular-locale_ewo-cm.js │ ├── angular-locale_ewo.js │ ├── angular-locale_fa-af.js │ ├── angular-locale_fa-ir.js │ ├── angular-locale_fa.js │ ├── angular-locale_ff-cm.js │ ├── angular-locale_ff-gn.js │ ├── angular-locale_ff-mr.js │ ├── angular-locale_ff-sn.js │ ├── angular-locale_ff.js │ ├── angular-locale_fi-fi.js │ ├── angular-locale_fi.js │ ├── angular-locale_fil-ph.js │ ├── angular-locale_fil.js │ ├── angular-locale_fo-fo.js │ ├── angular-locale_fo.js │ ├── angular-locale_fr-be.js │ ├── angular-locale_fr-bf.js │ ├── angular-locale_fr-bi.js │ ├── angular-locale_fr-bj.js │ ├── angular-locale_fr-bl.js │ ├── angular-locale_fr-ca.js │ ├── angular-locale_fr-cd.js │ ├── angular-locale_fr-cf.js │ ├── angular-locale_fr-cg.js │ ├── angular-locale_fr-ch.js │ ├── angular-locale_fr-ci.js │ ├── angular-locale_fr-cm.js │ ├── angular-locale_fr-dj.js │ ├── angular-locale_fr-dz.js │ ├── angular-locale_fr-fr.js │ ├── angular-locale_fr-ga.js │ ├── angular-locale_fr-gf.js │ ├── angular-locale_fr-gn.js │ ├── angular-locale_fr-gp.js │ ├── angular-locale_fr-gq.js │ ├── angular-locale_fr-ht.js │ ├── angular-locale_fr-km.js │ ├── angular-locale_fr-lu.js │ ├── angular-locale_fr-ma.js │ ├── angular-locale_fr-mc.js │ ├── angular-locale_fr-mf.js │ ├── angular-locale_fr-mg.js │ ├── angular-locale_fr-ml.js │ ├── angular-locale_fr-mq.js │ ├── angular-locale_fr-mr.js │ ├── angular-locale_fr-mu.js │ ├── angular-locale_fr-nc.js │ ├── angular-locale_fr-ne.js │ ├── angular-locale_fr-pf.js │ ├── angular-locale_fr-pm.js │ ├── angular-locale_fr-re.js │ ├── angular-locale_fr-rw.js │ ├── angular-locale_fr-sc.js │ ├── angular-locale_fr-sn.js │ ├── angular-locale_fr-sy.js │ ├── angular-locale_fr-td.js │ ├── angular-locale_fr-tg.js │ ├── angular-locale_fr-tn.js │ ├── angular-locale_fr-vu.js │ ├── angular-locale_fr-wf.js │ ├── angular-locale_fr-yt.js │ ├── angular-locale_fr.js │ ├── angular-locale_fur-it.js │ ├── angular-locale_fur.js │ ├── angular-locale_fy-nl.js │ ├── angular-locale_fy.js │ ├── angular-locale_ga-ie.js │ ├── angular-locale_ga.js │ ├── angular-locale_gd-gb.js │ ├── angular-locale_gd.js │ ├── angular-locale_gl-es.js │ ├── angular-locale_gl.js │ ├── angular-locale_gsw-ch.js │ ├── angular-locale_gsw-fr.js │ ├── angular-locale_gsw-li.js │ ├── angular-locale_gsw.js │ ├── angular-locale_gu-in.js │ ├── angular-locale_gu.js │ ├── angular-locale_guz-ke.js │ ├── angular-locale_guz.js │ ├── angular-locale_gv-im.js │ ├── angular-locale_gv.js │ ├── angular-locale_ha-latn-gh.js │ ├── angular-locale_ha-latn-ne.js │ ├── angular-locale_ha-latn-ng.js │ ├── angular-locale_ha-latn.js │ ├── angular-locale_ha.js │ ├── angular-locale_haw-us.js │ ├── angular-locale_haw.js │ ├── angular-locale_he-il.js │ ├── angular-locale_he.js │ ├── angular-locale_hi-in.js │ ├── angular-locale_hi.js │ ├── angular-locale_hr-ba.js │ ├── angular-locale_hr-hr.js │ ├── angular-locale_hr.js │ ├── angular-locale_hsb-de.js │ ├── angular-locale_hsb.js │ ├── angular-locale_hu-hu.js │ ├── angular-locale_hu.js │ ├── angular-locale_hy-am.js │ ├── angular-locale_hy.js │ ├── angular-locale_ia-fr.js │ ├── angular-locale_ia.js │ ├── angular-locale_id-id.js │ ├── angular-locale_id.js │ ├── angular-locale_ig-ng.js │ ├── angular-locale_ig.js │ ├── angular-locale_ii-cn.js │ ├── angular-locale_ii.js │ ├── angular-locale_in.js │ ├── angular-locale_is-is.js │ ├── angular-locale_is.js │ ├── angular-locale_it-ch.js │ ├── angular-locale_it-it.js │ ├── angular-locale_it-sm.js │ ├── angular-locale_it.js │ ├── angular-locale_iw.js │ ├── angular-locale_ja-jp.js │ ├── angular-locale_ja.js │ ├── angular-locale_jgo-cm.js │ ├── angular-locale_jgo.js │ ├── angular-locale_jmc-tz.js │ ├── angular-locale_jmc.js │ ├── angular-locale_ka-ge.js │ ├── angular-locale_ka.js │ ├── angular-locale_kab-dz.js │ ├── angular-locale_kab.js │ ├── angular-locale_kam-ke.js │ ├── angular-locale_kam.js │ ├── angular-locale_kde-tz.js │ ├── angular-locale_kde.js │ ├── angular-locale_kea-cv.js │ ├── angular-locale_kea.js │ ├── angular-locale_khq-ml.js │ ├── angular-locale_khq.js │ ├── angular-locale_ki-ke.js │ ├── angular-locale_ki.js │ ├── angular-locale_kk-cyrl-kz.js │ ├── angular-locale_kk-cyrl.js │ ├── angular-locale_kk.js │ ├── angular-locale_kkj-cm.js │ ├── angular-locale_kkj.js │ ├── angular-locale_kl-gl.js │ ├── angular-locale_kl.js │ ├── angular-locale_kln-ke.js │ ├── angular-locale_kln.js │ ├── angular-locale_km-kh.js │ ├── angular-locale_km.js │ ├── angular-locale_kn-in.js │ ├── angular-locale_kn.js │ ├── angular-locale_ko-kp.js │ ├── angular-locale_ko-kr.js │ ├── angular-locale_ko.js │ ├── angular-locale_kok-in.js │ ├── angular-locale_kok.js │ ├── angular-locale_ks-arab-in.js │ ├── angular-locale_ks-arab.js │ ├── angular-locale_ks.js │ ├── angular-locale_ksb-tz.js │ ├── angular-locale_ksb.js │ ├── angular-locale_ksf-cm.js │ ├── angular-locale_ksf.js │ ├── angular-locale_ksh-de.js │ ├── angular-locale_ksh.js │ ├── angular-locale_kw-gb.js │ ├── angular-locale_kw.js │ ├── angular-locale_ky-cyrl-kg.js │ ├── angular-locale_ky-cyrl.js │ ├── angular-locale_ky.js │ ├── angular-locale_lag-tz.js │ ├── angular-locale_lag.js │ ├── angular-locale_lb-lu.js │ ├── angular-locale_lb.js │ ├── angular-locale_lg-ug.js │ ├── angular-locale_lg.js │ ├── angular-locale_lkt-us.js │ ├── angular-locale_lkt.js │ ├── angular-locale_ln-ao.js │ ├── angular-locale_ln-cd.js │ ├── angular-locale_ln-cf.js │ ├── angular-locale_ln-cg.js │ ├── angular-locale_ln.js │ ├── angular-locale_lo-la.js │ ├── angular-locale_lo.js │ ├── angular-locale_lt-lt.js │ ├── angular-locale_lt.js │ ├── angular-locale_lu-cd.js │ ├── angular-locale_lu.js │ ├── angular-locale_luo-ke.js │ ├── angular-locale_luo.js │ ├── angular-locale_luy-ke.js │ ├── angular-locale_luy.js │ ├── angular-locale_lv-lv.js │ ├── angular-locale_lv.js │ ├── angular-locale_mas-ke.js │ ├── angular-locale_mas-tz.js │ ├── angular-locale_mas.js │ ├── angular-locale_mer-ke.js │ ├── angular-locale_mer.js │ ├── angular-locale_mfe-mu.js │ ├── angular-locale_mfe.js │ ├── angular-locale_mg-mg.js │ ├── angular-locale_mg.js │ ├── angular-locale_mgh-mz.js │ ├── angular-locale_mgh.js │ ├── angular-locale_mgo-cm.js │ ├── angular-locale_mgo.js │ ├── angular-locale_mk-mk.js │ ├── angular-locale_mk.js │ ├── angular-locale_ml-in.js │ ├── angular-locale_ml.js │ ├── angular-locale_mn-cyrl-mn.js │ ├── angular-locale_mn-cyrl.js │ ├── angular-locale_mn.js │ ├── angular-locale_mr-in.js │ ├── angular-locale_mr.js │ ├── angular-locale_ms-latn-bn.js │ ├── angular-locale_ms-latn-my.js │ ├── angular-locale_ms-latn-sg.js │ ├── angular-locale_ms-latn.js │ ├── angular-locale_ms.js │ ├── angular-locale_mt-mt.js │ ├── angular-locale_mt.js │ ├── angular-locale_mua-cm.js │ ├── angular-locale_mua.js │ ├── angular-locale_my-mm.js │ ├── angular-locale_my.js │ ├── angular-locale_naq-na.js │ ├── angular-locale_naq.js │ ├── angular-locale_nb-no.js │ ├── angular-locale_nb-sj.js │ ├── angular-locale_nb.js │ ├── angular-locale_nd-zw.js │ ├── angular-locale_nd.js │ ├── angular-locale_ne-in.js │ ├── angular-locale_ne-np.js │ ├── angular-locale_ne.js │ ├── angular-locale_nl-aw.js │ ├── angular-locale_nl-be.js │ ├── angular-locale_nl-bq.js │ ├── angular-locale_nl-cw.js │ ├── angular-locale_nl-nl.js │ ├── angular-locale_nl-sr.js │ ├── angular-locale_nl-sx.js │ ├── angular-locale_nl.js │ ├── angular-locale_nmg-cm.js │ ├── angular-locale_nmg.js │ ├── angular-locale_nn-no.js │ ├── angular-locale_nn.js │ ├── angular-locale_nnh-cm.js │ ├── angular-locale_nnh.js │ ├── angular-locale_no-no.js │ ├── angular-locale_no.js │ ├── angular-locale_nr-za.js │ ├── angular-locale_nr.js │ ├── angular-locale_nso-za.js │ ├── angular-locale_nso.js │ ├── angular-locale_nus-sd.js │ ├── angular-locale_nus.js │ ├── angular-locale_nyn-ug.js │ ├── angular-locale_nyn.js │ ├── angular-locale_om-et.js │ ├── angular-locale_om-ke.js │ ├── angular-locale_om.js │ ├── angular-locale_or-in.js │ ├── angular-locale_or.js │ ├── angular-locale_os-ge.js │ ├── angular-locale_os-ru.js │ ├── angular-locale_os.js │ ├── angular-locale_pa-arab-pk.js │ ├── angular-locale_pa-arab.js │ ├── angular-locale_pa-guru-in.js │ ├── angular-locale_pa-guru.js │ ├── angular-locale_pa.js │ ├── angular-locale_pl-pl.js │ ├── angular-locale_pl.js │ ├── angular-locale_ps-af.js │ ├── angular-locale_ps.js │ ├── angular-locale_pt-ao.js │ ├── angular-locale_pt-br.js │ ├── angular-locale_pt-cv.js │ ├── angular-locale_pt-gw.js │ ├── angular-locale_pt-mo.js │ ├── angular-locale_pt-mz.js │ ├── angular-locale_pt-pt.js │ ├── angular-locale_pt-st.js │ ├── angular-locale_pt-tl.js │ ├── angular-locale_pt.js │ ├── angular-locale_qu-bo.js │ ├── angular-locale_qu-ec.js │ ├── angular-locale_qu-pe.js │ ├── angular-locale_qu.js │ ├── angular-locale_rm-ch.js │ ├── angular-locale_rm.js │ ├── angular-locale_rn-bi.js │ ├── angular-locale_rn.js │ ├── angular-locale_ro-md.js │ ├── angular-locale_ro-ro.js │ ├── angular-locale_ro.js │ ├── angular-locale_rof-tz.js │ ├── angular-locale_rof.js │ ├── angular-locale_ru-by.js │ ├── angular-locale_ru-kg.js │ ├── angular-locale_ru-kz.js │ ├── angular-locale_ru-md.js │ ├── angular-locale_ru-ru.js │ ├── angular-locale_ru-ua.js │ ├── angular-locale_ru.js │ ├── angular-locale_rw-rw.js │ ├── angular-locale_rw.js │ ├── angular-locale_rwk-tz.js │ ├── angular-locale_rwk.js │ ├── angular-locale_sah-ru.js │ ├── angular-locale_sah.js │ ├── angular-locale_saq-ke.js │ ├── angular-locale_saq.js │ ├── angular-locale_sbp-tz.js │ ├── angular-locale_sbp.js │ ├── angular-locale_se-fi.js │ ├── angular-locale_se-no.js │ ├── angular-locale_se-se.js │ ├── angular-locale_se.js │ ├── angular-locale_seh-mz.js │ ├── angular-locale_seh.js │ ├── angular-locale_ses-ml.js │ ├── angular-locale_ses.js │ ├── angular-locale_sg-cf.js │ ├── angular-locale_sg.js │ ├── angular-locale_shi-latn-ma.js │ ├── angular-locale_shi-latn.js │ ├── angular-locale_shi-tfng-ma.js │ ├── angular-locale_shi-tfng.js │ ├── angular-locale_shi.js │ ├── angular-locale_si-lk.js │ ├── angular-locale_si.js │ ├── angular-locale_sk-sk.js │ ├── angular-locale_sk.js │ ├── angular-locale_sl-si.js │ ├── angular-locale_sl.js │ ├── angular-locale_smn-fi.js │ ├── angular-locale_smn.js │ ├── angular-locale_sn-zw.js │ ├── angular-locale_sn.js │ ├── angular-locale_so-dj.js │ ├── angular-locale_so-et.js │ ├── angular-locale_so-ke.js │ ├── angular-locale_so-so.js │ ├── angular-locale_so.js │ ├── angular-locale_sq-al.js │ ├── angular-locale_sq-mk.js │ ├── angular-locale_sq-xk.js │ ├── angular-locale_sq.js │ ├── angular-locale_sr-cyrl-ba.js │ ├── angular-locale_sr-cyrl-me.js │ ├── angular-locale_sr-cyrl-rs.js │ ├── angular-locale_sr-cyrl-xk.js │ ├── angular-locale_sr-cyrl.js │ ├── angular-locale_sr-latn-ba.js │ ├── angular-locale_sr-latn-me.js │ ├── angular-locale_sr-latn-rs.js │ ├── angular-locale_sr-latn-xk.js │ ├── angular-locale_sr-latn.js │ ├── angular-locale_sr.js │ ├── angular-locale_ss-sz.js │ ├── angular-locale_ss-za.js │ ├── angular-locale_ss.js │ ├── angular-locale_ssy-er.js │ ├── angular-locale_ssy.js │ ├── angular-locale_st-ls.js │ ├── angular-locale_st-za.js │ ├── angular-locale_st.js │ ├── angular-locale_sv-ax.js │ ├── angular-locale_sv-fi.js │ ├── angular-locale_sv-se.js │ ├── angular-locale_sv.js │ ├── angular-locale_sw-ke.js │ ├── angular-locale_sw-tz.js │ ├── angular-locale_sw-ug.js │ ├── angular-locale_sw.js │ ├── angular-locale_swc-cd.js │ ├── angular-locale_swc.js │ ├── angular-locale_ta-in.js │ ├── angular-locale_ta-lk.js │ ├── angular-locale_ta-my.js │ ├── angular-locale_ta-sg.js │ ├── angular-locale_ta.js │ ├── angular-locale_te-in.js │ ├── angular-locale_te.js │ ├── angular-locale_teo-ke.js │ ├── angular-locale_teo-ug.js │ ├── angular-locale_teo.js │ ├── angular-locale_tg-cyrl-tj.js │ ├── angular-locale_tg-cyrl.js │ ├── angular-locale_tg.js │ ├── angular-locale_th-th.js │ ├── angular-locale_th.js │ ├── angular-locale_ti-er.js │ ├── angular-locale_ti-et.js │ ├── angular-locale_ti.js │ ├── angular-locale_tig-er.js │ ├── angular-locale_tig.js │ ├── angular-locale_tl.js │ ├── angular-locale_tn-bw.js │ ├── angular-locale_tn-za.js │ ├── angular-locale_tn.js │ ├── angular-locale_to-to.js │ ├── angular-locale_to.js │ ├── angular-locale_tr-cy.js │ ├── angular-locale_tr-tr.js │ ├── angular-locale_tr.js │ ├── angular-locale_ts-za.js │ ├── angular-locale_ts.js │ ├── angular-locale_twq-ne.js │ ├── angular-locale_twq.js │ ├── angular-locale_tzm-latn-ma.js │ ├── angular-locale_tzm-latn.js │ ├── angular-locale_tzm.js │ ├── angular-locale_ug-arab-cn.js │ ├── angular-locale_ug-arab.js │ ├── angular-locale_ug.js │ ├── angular-locale_uk-ua.js │ ├── angular-locale_uk.js │ ├── angular-locale_ur-in.js │ ├── angular-locale_ur-pk.js │ ├── angular-locale_ur.js │ ├── angular-locale_uz-arab-af.js │ ├── angular-locale_uz-arab.js │ ├── angular-locale_uz-cyrl-uz.js │ ├── angular-locale_uz-cyrl.js │ ├── angular-locale_uz-latn-uz.js │ ├── angular-locale_uz-latn.js │ ├── angular-locale_uz.js │ ├── angular-locale_vai-latn-lr.js │ ├── angular-locale_vai-latn.js │ ├── angular-locale_vai-vaii-lr.js │ ├── angular-locale_vai-vaii.js │ ├── angular-locale_vai.js │ ├── angular-locale_ve-za.js │ ├── angular-locale_ve.js │ ├── angular-locale_vi-vn.js │ ├── angular-locale_vi.js │ ├── angular-locale_vo-001.js │ ├── angular-locale_vo.js │ ├── angular-locale_vun-tz.js │ ├── angular-locale_vun.js │ ├── angular-locale_wae-ch.js │ ├── angular-locale_wae.js │ ├── angular-locale_wal-et.js │ ├── angular-locale_wal.js │ ├── angular-locale_xh-za.js │ ├── angular-locale_xh.js │ ├── angular-locale_xog-ug.js │ ├── angular-locale_xog.js │ ├── angular-locale_yav-cm.js │ ├── angular-locale_yav.js │ ├── angular-locale_yi-001.js │ ├── angular-locale_yi.js │ ├── angular-locale_yo-bj.js │ ├── angular-locale_yo-ng.js │ ├── angular-locale_yo.js │ ├── angular-locale_zgh-ma.js │ ├── angular-locale_zgh.js │ ├── angular-locale_zh-cn.js │ ├── angular-locale_zh-hans-cn.js │ ├── angular-locale_zh-hans-hk.js │ ├── angular-locale_zh-hans-mo.js │ ├── angular-locale_zh-hans-sg.js │ ├── angular-locale_zh-hans.js │ ├── angular-locale_zh-hant-hk.js │ ├── angular-locale_zh-hant-mo.js │ ├── angular-locale_zh-hant-tw.js │ ├── angular-locale_zh-hant.js │ ├── angular-locale_zh-hk.js │ ├── angular-locale_zh-tw.js │ ├── angular-locale_zh.js │ ├── angular-locale_zu-za.js │ └── angular-locale_zu.js ├── ngMessages │ └── messages.js ├── ngMock │ ├── .jshintrc │ └── angular-mocks.js ├── ngResource │ ├── .jshintrc │ └── resource.js ├── ngRoute │ ├── .jshintrc │ ├── directive │ │ └── ngView.js │ ├── route.js │ └── routeParams.js ├── ngSanitize │ ├── .jshintrc │ ├── filter │ │ └── linky.js │ └── sanitize.js ├── ngScenario │ ├── .jshintrc │ ├── Application.js │ ├── Describe.js │ ├── Future.js │ ├── ObjectModel.js │ ├── Runner.js │ ├── Scenario.js │ ├── SpecRunner.js │ ├── angular-bootstrap.js │ ├── angular.prefix │ ├── angular.suffix │ ├── browserTrigger.js │ ├── dsl.js │ ├── matchers.js │ └── output │ │ ├── Html.js │ │ ├── Json.js │ │ ├── Object.js │ │ └── Xml.js ├── ngTouch │ ├── .jshintrc │ ├── directive │ │ ├── ngClick.js │ │ └── ngSwipe.js │ ├── swipe.js │ └── touch.js ├── publishExternalApis.js └── stringify.js ├── test ├── .jshintrc ├── AngularSpec.js ├── ApiSpecs.js ├── BinderSpec.js ├── auto │ └── injectorSpec.js ├── e2e │ ├── fixtures │ │ ├── .jshintrc │ │ └── sample │ │ │ ├── index.html │ │ │ └── script.js │ ├── tests │ │ ├── .jshintrc │ │ ├── helpers │ │ │ └── main.js │ │ └── sampleSpec.js │ └── tools │ │ ├── .jshintrc │ │ ├── fixture.js │ │ ├── index.js │ │ ├── middleware.js │ │ └── util.js ├── helpers │ ├── matchers.js │ ├── privateMocks.js │ ├── privateMocksSpec.js │ └── testabilityPatch.js ├── jQueryPatchSpec.js ├── jqLiteSpec.js ├── jquery_alias.js ├── jquery_remove.js ├── loaderSpec.js ├── minErrSpec.js ├── ng │ ├── anchorScrollSpec.js │ ├── animateSpec.js │ ├── asyncCallbackSpec.js │ ├── browserSpecs.js │ ├── cacheFactorySpec.js │ ├── compileSpec.js │ ├── controllerSpec.js │ ├── directive │ │ ├── aSpec.js │ │ ├── booleanAttrsSpec.js │ │ ├── formSpec.js │ │ ├── inputSpec.js │ │ ├── ngBindSpec.js │ │ ├── ngChangeSpec.js │ │ ├── ngClassSpec.js │ │ ├── ngClickSpec.js │ │ ├── ngCloakSpec.js │ │ ├── ngControllerSpec.js │ │ ├── ngEventDirsSpec.js │ │ ├── ngIfSpec.js │ │ ├── ngIncludeSpec.js │ │ ├── ngInitSpec.js │ │ ├── ngKeySpec.js │ │ ├── ngListSpec.js │ │ ├── ngModelSpec.js │ │ ├── ngNonBindableSpec.js │ │ ├── ngOptionsSpec.js │ │ ├── ngPluralizeSpec.js │ │ ├── ngRepeatSpec.js │ │ ├── ngShowHideSpec.js │ │ ├── ngSrcSpec.js │ │ ├── ngSrcsetSpec.js │ │ ├── ngStyleSpec.js │ │ ├── ngSwitchSpec.js │ │ ├── scriptSpec.js │ │ ├── selectSpec.js │ │ ├── styleSpec.js │ │ └── validatorsSpec.js │ ├── documentSpec.js │ ├── exceptionHandlerSpec.js │ ├── filter │ │ ├── filterSpec.js │ │ ├── filtersSpec.js │ │ ├── limitToSpec.js │ │ └── orderBySpec.js │ ├── filterSpec.js │ ├── httpBackendSpec.js │ ├── httpSpec.js │ ├── interpolateSpec.js │ ├── intervalSpec.js │ ├── localeSpec.js │ ├── locationSpec.js │ ├── logSpec.js │ ├── parseSpec.js │ ├── qSpec.js │ ├── rafSpec.js │ ├── rootElementSpec.js │ ├── rootScopeSpec.js │ ├── sanitizeUriSpec.js │ ├── sceSpecs.js │ ├── snifferSpec.js │ ├── templateRequestSpec.js │ ├── testabilitySpec.js │ ├── timeoutSpec.js │ ├── urlUtilsSpec.js │ └── windowSpec.js ├── ngAnimate │ └── animateSpec.js ├── ngAria │ └── ariaSpec.js ├── ngCookies │ └── cookiesSpec.js ├── ngMessages │ └── messagesSpec.js ├── ngMock │ └── angular-mocksSpec.js ├── ngResource │ └── resourceSpec.js ├── ngRoute │ ├── directive │ │ └── ngViewSpec.js │ ├── routeParamsSpec.js │ └── routeSpec.js ├── ngSanitize │ ├── directive │ │ └── ngBindHtmlSpec.js │ ├── filter │ │ └── linkySpec.js │ └── sanitizeSpec.js ├── ngScenario │ ├── ApplicationSpec.js │ ├── DescribeSpec.js │ ├── FutureSpec.js │ ├── ObjectModelSpec.js │ ├── RunnerSpec.js │ ├── ScenarioSpec.js │ ├── SpecRunnerSpec.js │ ├── dslSpec.js │ ├── e2e │ │ ├── Runner-compiled.html │ │ ├── Runner.html │ │ ├── style.css │ │ ├── widgets-scenario.js │ │ └── widgets.html │ ├── matchersSpec.js │ ├── mocks.js │ └── output │ │ ├── HtmlSpec.js │ │ ├── jsonSpec.js │ │ ├── objectSpec.js │ │ └── xmlSpec.js ├── ngTouch │ ├── directive │ │ ├── ngClickSpec.js │ │ └── ngSwipeSpec.js │ └── swipeSpec.js └── stringifySpec.js ├── validate-commit-msg.js └── validate-commit-msg.spec.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [dropdown-toggle.js] 14 | trim_trailing_whitespace = false 15 | insert_final_newline = false 16 | 17 | [htmlparser.js] 18 | insert_final_newline = false 19 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # JS files must always use LF for tools to work 5 | *.js eol=lf 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /benchpress-build/ 3 | .DS_Store 4 | gen_docs.disable 5 | test.disable 6 | regression/temp*.html 7 | performance/temp*.html 8 | .idea/workspace.xml 9 | *~ 10 | *.swp 11 | angular.js.tmproj 12 | /node_modules/ 13 | bower_components/ 14 | angular.xcodeproj 15 | .idea 16 | *.iml 17 | .agignore 18 | .lvimrc 19 | libpeerconnection.log 20 | npm-debug.log 21 | /tmp/ 22 | /scripts/bower/bower-* 23 | -------------------------------------------------------------------------------- /.jscs.json.todo: -------------------------------------------------------------------------------- 1 | // This is an incomplete TODO list of checks we want to start enforcing 2 | // 3 | // The goal is to enable these checks one by one by moving them to .jscs.json along with commits 4 | // that correct the existing code base issues and make the new check pass. 5 | 6 | { 7 | "validateParameterSeparator": ", ", // Re-assert this rule when JSCS allows multiple spaces 8 | "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], 9 | "disallowImplicitTypeConversion": ["string"], 10 | "disallowMultipleLineBreaks": true, 11 | "validateJSDoc": { 12 | "checkParamNames": true, 13 | "requireParamTypes": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | node_modules/** 2 | lib/htmlparser/** 3 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ".jshintrc-base", 3 | "node": true, 4 | "globals": {} 5 | } 6 | -------------------------------------------------------------------------------- /.jshintrc-base: -------------------------------------------------------------------------------- 1 | { 2 | "bitwise": true, 3 | "immed": true, 4 | "newcap": true, 5 | "noarg": true, 6 | "noempty": true, 7 | "nonew": true, 8 | "trailing": true, 9 | "maxlen": 200, 10 | "boss": true, 11 | "eqnull": true, 12 | "expr": true, 13 | "globalstrict": true, 14 | "laxbreak": true, 15 | "loopfunc": true, 16 | "sub": true, 17 | "undef": true, 18 | "indent": 2 19 | } 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010-2015 Google, Inc. http://angularjs.org 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.closure.md: -------------------------------------------------------------------------------- 1 | Using AngularJS with the Closure Compiler 2 | ========================================= 3 | 4 | The Closure Compiler project contains externs definitions for AngularJS 5 | JavaScript in its `contrib/externs` directory. 6 | 7 | The definitions contain externs for use with the Closure compiler (aka 8 | JSCompiler). Passing these files to the --externs parameter of a compiler 9 | pass allows using type annotations for AngularJS objects. For example, 10 | Angular's $scope objects can be annotated as: 11 | ```js 12 | /** @type {angular.Scope} */ 13 | var scope = $scope; 14 | ``` 15 | 16 | This allows JSCompiler to type check accesses to scope, give warnings about 17 | missing methods or incorrect arguments, and also prevents renaming of property 18 | accesses with advanced compilation. 19 | 20 | The externs are incomplete and maintained on an as-needed basis, but strive to 21 | be correct. Externs for individual modules should be added in separate files. 22 | 23 | See https://developers.google.com/closure/compiler/ 24 | -------------------------------------------------------------------------------- /benchmarks/README.md: -------------------------------------------------------------------------------- 1 | Instructions for using benchpress (how to create benchmarks, how to run, how to configure) can be 2 | found at: https://github.com/angular/benchpress/blob/master/README.md. 3 | 4 | In this project, there is a configured grunt task for building the benchmarks, 5 | `grunt bp_build`, which places the runnable benchmarks in "/build/benchmarks/". 6 | The existing `grunt webserver` task can be used to serve the built benchmarks at `localhost:8000/build/benchmarks/` 7 | -------------------------------------------------------------------------------- /benchmarks/event-delegation-bp/app.js: -------------------------------------------------------------------------------- 1 | var app = angular.module('eventDelegationBenchmark', []); 2 | 3 | app.directive('noopDir', function() { 4 | return { 5 | compile: function($element, $attrs) { 6 | return function($scope, $element) { 7 | return 1; 8 | } 9 | } 10 | }; 11 | }); 12 | 13 | app.directive('nativeClick', ['$parse', function($parse) { 14 | return { 15 | compile: function($element, $attrs) { 16 | var expr = $parse($attrs.tstEvent); 17 | return function($scope, $element) { 18 | $element[0].addEventListener('click', function() { 19 | console.log('clicked'); 20 | }, false); 21 | } 22 | } 23 | }; 24 | }]); 25 | 26 | app.directive('dlgtClick', function() { 27 | return { 28 | compile: function($element, $attrs) { 29 | var evt = $attrs.dlgtClick; 30 | // We don't setup the global event listeners as the costs are small and one time only... 31 | } 32 | }; 33 | }); 34 | 35 | app.controller('DataController', function($rootScope) { 36 | this.ngRepeatCount = 1000; 37 | this.rows = []; 38 | var self = this; 39 | 40 | benchmarkSteps.push({ 41 | name: '$apply', 42 | fn: function() { 43 | var oldRows = self.rows; 44 | $rootScope.$apply(function() { 45 | self.rows = []; 46 | }); 47 | self.rows = oldRows; 48 | if (self.rows.length !== self.ngRepeatCount) { 49 | self.rows = []; 50 | for (var i=0; i 2 |
3 |
4 |

5 | Tests the execution of ng-options for rendering during model and option updates. 6 |

7 | 8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /benchmarks/orderby-bp/app.js: -------------------------------------------------------------------------------- 1 | var app = angular.module('orderByBenchmark', []); 2 | 3 | app.controller('DataController', function($rootScope, $scope) { 4 | this.ngRepeatCount = 5000; 5 | this.rows = []; 6 | var self = this; 7 | 8 | $scope.benchmarkType = 'basic'; 9 | 10 | $scope.rawProperty = function(key) { 11 | return function(item) { 12 | return item[key]; 13 | }; 14 | }; 15 | 16 | // Returns a random integer between min (included) and max (excluded) 17 | function getRandomInt(min, max) { 18 | return Math.floor(Math.random() * (max - min)) + min; 19 | } 20 | 21 | benchmarkSteps.push({ 22 | name: 'setup', 23 | description: 'Set rows to empty array and apply, then push new rows to be applied in next step', 24 | fn: function() { 25 | var oldRows = self.rows; 26 | $rootScope.$apply(function() { 27 | self.rows = []; 28 | }); 29 | self.rows = oldRows; 30 | if (self.rows.length !== self.ngRepeatCount) { 31 | self.rows = []; 32 | for (var i = 0; i < self.ngRepeatCount; i++) { 33 | self.rows.push({ 34 | 'name': getRandomInt(i, (i + 40)), 35 | 'index': i 36 | }); 37 | } 38 | } 39 | } 40 | }) 41 | 42 | benchmarkSteps.push({ 43 | name: '$apply', 44 | fn: function() { 45 | $rootScope.$apply(); 46 | } 47 | }); 48 | }); 49 | -------------------------------------------------------------------------------- /benchmarks/orderby-bp/bp.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | scripts: [ 4 | { 5 | "id": "jquery", 6 | "src": "jquery-noop.js" 7 | },{ 8 | id: 'angular', 9 | src: '/build/angular.js' 10 | },{ 11 | src: 'app.js', 12 | }] 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /benchmarks/parsed-expressions-bp/bp.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | scripts: [ { 4 | id: 'angular', 5 | src: '/build/angular.js' 6 | }, 7 | { 8 | src: 'app.js', 9 | }] 10 | }); 11 | }; 12 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AngularJS", 3 | "devDependencies": { 4 | "jquery": "2.1.1", 5 | "closure-compiler": "https://dl.google.com/closure-compiler/compiler-20140814.zip", 6 | "ng-closure-runner": "https://raw.github.com/angular/ng-closure-runner/v0.2.3/assets/ng-closure-runner.zip" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /check-size.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | grunt minify 4 | gzip -c < build/angular.min.js > build/angular.min.js.gzip 5 | ls -l build/angular.min.* 6 | -------------------------------------------------------------------------------- /css/angular.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], 4 | .ng-cloak, .x-ng-cloak, 5 | .ng-hide:not(.ng-hide-animate) { 6 | display: none !important; 7 | } 8 | 9 | ng\:form { 10 | display: block; 11 | } 12 | -------------------------------------------------------------------------------- /docs/app/assets/Error404.html: -------------------------------------------------------------------------------- 1 |

Oops!

2 | 3 |

The page you requested does not exist. Perhaps you were looking for something else...

4 | 5 |
6 | 7 |
8 |
{{ key }}
9 |
{{ item.name }}
10 |
11 |
12 | -------------------------------------------------------------------------------- /docs/app/assets/css/animations.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/docs/app/assets/css/animations.css -------------------------------------------------------------------------------- /docs/app/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/docs/app/assets/favicon.ico -------------------------------------------------------------------------------- /docs/app/assets/img/AngularJS-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/docs/app/assets/img/AngularJS-small.png -------------------------------------------------------------------------------- /docs/app/assets/img/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/docs/app/assets/img/bullet.png -------------------------------------------------------------------------------- /docs/app/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/docs/app/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/app/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/docs/app/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/app/assets/js/search-worker.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* jshint browser: true */ 3 | /* global importScripts, onmessage: true, postMessage, lunr */ 4 | 5 | // Load up the lunr library 6 | importScripts('../components/lunr.js-0.4.2/lunr.min.js'); 7 | 8 | // Create the lunr index - the docs should be an array of object, each object containing 9 | // the path and search terms for a page 10 | var index = lunr(function() { 11 | this.ref('path'); 12 | this.field('titleWords', {boost: 50}); 13 | this.field('members', { boost: 40}); 14 | this.field('keywords', { boost : 20 }); 15 | }); 16 | 17 | // Retrieve the searchData which contains the information about each page to be indexed 18 | var searchData = {}; 19 | var searchDataRequest = new XMLHttpRequest(); 20 | searchDataRequest.onload = function() { 21 | 22 | // Store the pages data to be used in mapping query results back to pages 23 | searchData = JSON.parse(this.responseText); 24 | // Add search terms from each page to the search index 25 | searchData.forEach(function(page) { 26 | index.add(page); 27 | }); 28 | postMessage({ e: 'index-ready' }); 29 | }; 30 | searchDataRequest.open('GET', 'search-data.json'); 31 | searchDataRequest.send(); 32 | 33 | // The worker receives a message everytime the web app wants to query the index 34 | onmessage = function(oEvent) { 35 | var q = oEvent.data.q; 36 | var hits = index.search(q); 37 | var results = []; 38 | // Only return the array of paths to pages 39 | hits.forEach(function(hit) { 40 | results.push(hit.ref); 41 | }); 42 | // The results of the query are sent back to the web app via a new message 43 | postMessage({ e: 'query-ready', q: q, d: results }); 44 | }; -------------------------------------------------------------------------------- /docs/app/e2e/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.jshintrc-base", 3 | 4 | "globals": { 5 | 6 | /* jasmine / karma */ 7 | "it": false, 8 | "iit": false, 9 | "describe": false, 10 | "ddescribe": false, 11 | "beforeEach": false, 12 | "afterEach": false, 13 | "expect": false, 14 | "jasmine": false, 15 | "spyOn": false, 16 | "waits": false, 17 | "waitsFor": false, 18 | "runs": false, 19 | "dump": false, 20 | 21 | /* e2e */ 22 | "browser": false, 23 | "element": false, 24 | "by": false, 25 | 26 | /* testabilityPatch / matchers */ 27 | "inject": false, 28 | "module": false, 29 | "dealoc": false, 30 | "_jQuery": false, 31 | "_jqLiteMode": false, 32 | "sortedHtml": false, 33 | "childrenTagsOf": false, 34 | "assertHidden": false, 35 | "assertVisible": false, 36 | "provideLog": false, 37 | "spyOnlyCallsWithArgs": false, 38 | "createMockStyleSheet": false, 39 | "browserTrigger": false, 40 | "jqLiteCacheSize": false 41 | } 42 | } -------------------------------------------------------------------------------- /docs/app/e2e/api-docs/provider-pages.scenario.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe("provider pages", function() { 4 | 5 | it("should show the related service", function() { 6 | browser.get('build/docs/index.html#!/api/ng/provider/$compileProvider'); 7 | var serviceLink = element.all(by.css('ol.api-profile-header-structure li a')).first(); 8 | expect(serviceLink.getText()).toEqual('- $compile'); 9 | expect(serviceLink.getAttribute('href')).toMatch(/api\/ng\/service\/\$compile/); 10 | }); 11 | 12 | }); -------------------------------------------------------------------------------- /docs/app/e2e/api-docs/service-pages.scenario.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe("service pages", function() { 4 | 5 | it("should show the related provider if there is one", function() { 6 | browser.get('build/docs/index.html#!/api/ng/service/$compile'); 7 | var providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first(); 8 | expect(providerLink.getText()).toEqual('- $compileProvider'); 9 | expect(providerLink.getAttribute('href')).toMatch(/api\/ng\/provider\/\$compileProvider/); 10 | 11 | browser.get('build/docs/index.html#!/api/ng/service/$q'); 12 | providerLink = element.all(by.css('ol.api-profile-header-structure li a')).first(); 13 | expect(providerLink.getText()).not.toEqual('- $qProvider'); 14 | expect(providerLink.getAttribute('href')).not.toMatch(/api\/ng\/provider\/\$compileProvider/); 15 | }); 16 | 17 | it("should show parameter defaults", function() { 18 | browser.get('build/docs/index.html#!/api/ng/service/$timeout'); 19 | expect(element.all(by.css('.input-arguments p em')).first().getText()).toContain('(default: 0)'); 20 | }); 21 | 22 | }); -------------------------------------------------------------------------------- /docs/app/src/app.js: -------------------------------------------------------------------------------- 1 | angular.module('docsApp', [ 2 | 'ngRoute', 3 | 'ngCookies', 4 | 'ngSanitize', 5 | 'ngAnimate', 6 | 'DocsController', 7 | 'versionsData', 8 | 'pagesData', 9 | 'navData', 10 | 'directives', 11 | 'errors', 12 | 'examples', 13 | 'search', 14 | 'tutorials', 15 | 'versions', 16 | 'bootstrap', 17 | 'ui.bootstrap.dropdown' 18 | ]) 19 | 20 | .config(['$locationProvider', function($locationProvider) { 21 | $locationProvider.html5Mode(true).hashPrefix('!'); 22 | }]); 23 | -------------------------------------------------------------------------------- /docs/app/src/directives.js: -------------------------------------------------------------------------------- 1 | angular.module('directives', []) 2 | 3 | /** 4 | * backToTop Directive 5 | * @param {Function} $anchorScroll 6 | * 7 | * @description Ensure that the browser scrolls when the anchor is clicked 8 | */ 9 | .directive('backToTop', ['$anchorScroll', '$location', function($anchorScroll, $location) { 10 | return function link(scope, element) { 11 | element.on('click', function(event) { 12 | $location.hash(''); 13 | scope.$apply($anchorScroll); 14 | }); 15 | }; 16 | }]) 17 | 18 | 19 | .directive('code', function() { 20 | return { 21 | restrict: 'E', 22 | terminal: true, 23 | compile: function(element) { 24 | var linenums = element.hasClass('linenum');// || element.parent()[0].nodeName === 'PRE'; 25 | var match = /lang-(\S+)/.exec(element[0].className); 26 | var lang = match && match[1]; 27 | var html = element.html(); 28 | element.html(window.prettyPrintOne(html, lang, linenums)); 29 | } 30 | }; 31 | }) 32 | 33 | .directive('scrollYOffsetElement', ['$anchorScroll', function($anchorScroll) { 34 | return function(scope, element) { 35 | $anchorScroll.yOffset = element; 36 | }; 37 | }]); 38 | -------------------------------------------------------------------------------- /docs/app/src/versions.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | angular.module('versions', []) 4 | 5 | .controller('DocsVersionsCtrl', ['$scope', '$location', '$window', 'NG_VERSIONS', function($scope, $location, $window, NG_VERSIONS) { 6 | $scope.docs_version = NG_VERSIONS[0]; 7 | $scope.docs_versions = NG_VERSIONS; 8 | 9 | for(var i=0, minor = NaN; i < NG_VERSIONS.length; i++) { 10 | var version = NG_VERSIONS[i]; 11 | // NaN will give false here 12 | if (minor <= version.minor) { 13 | continue; 14 | } 15 | version.isLatest = true; 16 | minor = version.minor; 17 | } 18 | 19 | $scope.getGroupName = function(v) { 20 | return v.isLatest ? 'Latest' : ('v' + v.major + '.' + v.minor + '.x'); 21 | }; 22 | 23 | $scope.jumpToDocsVersion = function(version) { 24 | var currentPagePath = $location.path().replace(/\/$/, ''); 25 | 26 | // TODO: We need to do some munging of the path for different versions of the API... 27 | 28 | 29 | $window.location = version.docsUrl + currentPagePath; 30 | }; 31 | }]); 32 | -------------------------------------------------------------------------------- /docs/app/test/directivesSpec.js: -------------------------------------------------------------------------------- 1 | describe("code", function() { 2 | var prettyPrintOne, oldPP; 3 | var compile, scope; 4 | 5 | var any = jasmine.any; 6 | 7 | beforeEach(module('directives')); 8 | 9 | beforeEach(inject(function($rootScope, $compile) { 10 | // Provide stub for pretty print function 11 | oldPP = window.prettyPrintOne; 12 | prettyPrintOne = window.prettyPrintOne = jasmine.createSpy(); 13 | 14 | scope = $rootScope.$new(); 15 | compile = $compile; 16 | })); 17 | 18 | afterEach(function() { 19 | window.prettyPrintOne = oldPP; 20 | }); 21 | 22 | 23 | it('should pretty print innerHTML', function() { 24 | compile('var x;')(scope); 25 | expect(prettyPrintOne).toHaveBeenCalledWith('var x;', null, false); 26 | }); 27 | 28 | it('should allow language declaration', function() { 29 | compile('')(scope); 30 | expect(prettyPrintOne).toHaveBeenCalledWith(any(String), 'javascript', false); 31 | }); 32 | 33 | it('supports allow line numbers', function() { 34 | compile('')(scope); 35 | expect(prettyPrintOne).toHaveBeenCalledWith(any(String), null, true); 36 | }); 37 | }); 38 | 39 | -------------------------------------------------------------------------------- /docs/app/test/docsSpec.js: -------------------------------------------------------------------------------- 1 | describe("DocsController", function() { 2 | var $scope; 3 | 4 | angular.module('fake', []) 5 | .value('$cookies', {}) 6 | .value('openPlunkr', function() {}) 7 | .value('NG_PAGES', {}) 8 | .value('NG_NAVIGATION', {}) 9 | .value('NG_VERSION', {}); 10 | 11 | beforeEach(module('fake', 'DocsController')); 12 | beforeEach(inject(function($rootScope, $controller) { 13 | $scope = $rootScope; 14 | $controller('DocsController', { $scope: $scope }); 15 | })); 16 | 17 | 18 | describe('afterPartialLoaded', function() { 19 | it("should update the Google Analytics with currentPage path if currentPage exists", inject(function($window) { 20 | $window._gaq = []; 21 | $scope.currentPage = { path: 'a/b/c' }; 22 | $scope.$broadcast('$includeContentLoaded'); 23 | expect($window._gaq.pop()).toEqual(['_trackPageview', 'a/b/c']); 24 | })); 25 | 26 | 27 | it("should update the Google Analytics with $location.path if currentPage is missing", inject(function($window, $location) { 28 | $window._gaq = []; 29 | spyOn($location, 'path').andReturn('x/y/z'); 30 | $scope.$broadcast('$includeContentLoaded'); 31 | expect($window._gaq.pop()).toEqual(['_trackPageview', 'x/y/z']); 32 | })); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /docs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AngularJS-docs-app", 3 | "dependencies": { 4 | "jquery": "2.1.1", 5 | "lunr.js": "0.4.3", 6 | "open-sans-fontface": "1.0.4", 7 | "google-code-prettify": "1.0.1", 8 | "bootstrap": "3.1.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /docs/config/inline-tag-defs/type.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var encoder = new require('node-html-encoder').Encoder(); 4 | 5 | /** 6 | * @dgService typeInlineTagDef 7 | * @description 8 | * Replace with markup that displays a nice type 9 | */ 10 | module.exports = function typeInlineTagDef(getTypeClass) { 11 | return { 12 | name: 'type', 13 | handler: function(doc, tagName, tagDescription) { 14 | return ''+encoder.htmlEncode(tagDescription) + ''; 15 | } 16 | }; 17 | }; -------------------------------------------------------------------------------- /docs/config/processors/index-page.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _ = require('lodash'); 4 | var path = require('canonical-path'); 5 | 6 | /** 7 | * @dgProcessor generateIndexPagesProcessor 8 | * @description 9 | * This processor creates docs that will be rendered as the index page for the app 10 | */ 11 | module.exports = function generateIndexPagesProcessor() { 12 | return { 13 | deployments: [], 14 | $validate: { 15 | deployments: { presence: true } 16 | }, 17 | $runAfter: ['adding-extra-docs'], 18 | $runBefore: ['extra-docs-added'], 19 | $process: function(docs) { 20 | 21 | // Collect up all the areas in the docs 22 | var areas = {}; 23 | docs.forEach(function(doc) { 24 | if ( doc.area ) { 25 | areas[doc.area] = doc.area; 26 | } 27 | }); 28 | areas = _.keys(areas); 29 | 30 | this.deployments.forEach(function(deployment) { 31 | 32 | var indexDoc = _.defaults({ 33 | docType: 'indexPage', 34 | areas: areas 35 | }, deployment); 36 | 37 | indexDoc.id = 'index' + (deployment.name === 'default' ? '' : '-' + deployment.name); 38 | 39 | docs.push(indexDoc); 40 | }); 41 | } 42 | }; 43 | }; -------------------------------------------------------------------------------- /docs/config/processors/versions-data.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _ = require('lodash'); 4 | 5 | /** 6 | * @dgProcessor generateVersionDocProcessor 7 | * @description 8 | * This processor will create a new doc that will be rendered as a JavaScript file 9 | * containing meta information about the current versions of AngularJS 10 | */ 11 | module.exports = function generateVersionDocProcessor(gitData) { 12 | return { 13 | $runAfter: ['generatePagesDataProcessor'], 14 | $runBefore: ['rendering-docs'], 15 | $process: function(docs) { 16 | 17 | var versionDoc = { 18 | docType: 'versions-data', 19 | id: 'versions-data', 20 | template: 'versions-data.template.js', 21 | outputPath: 'js/versions-data.js', 22 | currentVersion: gitData.version 23 | }; 24 | 25 | versionDoc.versions = _(gitData.versions) 26 | .filter(function(version) { return version.major > 0; }) 27 | .push(gitData.version) 28 | .reverse() 29 | .value(); 30 | 31 | docs.push(versionDoc); 32 | } 33 | }; 34 | }; -------------------------------------------------------------------------------- /docs/config/services/deployments/debug.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function debugDeployment(getVersion) { 4 | return { 5 | name: 'debug', 6 | examples: { 7 | commonFiles: { 8 | scripts: [ '../../../angular.js' ] 9 | }, 10 | dependencyPath: '../../../' 11 | }, 12 | scripts: [ 13 | '../angular.js', 14 | '../angular-resource.js', 15 | '../angular-route.js', 16 | '../angular-cookies.js', 17 | '../angular-sanitize.js', 18 | '../angular-touch.js', 19 | '../angular-animate.js', 20 | 'components/marked-' + getVersion('marked', 'node_modules', 'package.json') + '/lib/marked.js', 21 | 'js/angular-bootstrap/bootstrap.js', 22 | 'js/angular-bootstrap/dropdown-toggle.js', 23 | 'components/lunr.js-' + getVersion('lunr.js') + '/lunr.js', 24 | 'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js', 25 | 'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/lang-css.js', 26 | 'js/versions-data.js', 27 | 'js/pages-data.js', 28 | 'js/nav-data.js', 29 | 'js/docs.js' 30 | ], 31 | stylesheets: [ 32 | 'components/bootstrap-' + getVersion('bootstrap') + '/css/bootstrap.css', 33 | 'components/open-sans-fontface-' + getVersion('open-sans-fontface') + '/open-sans.css', 34 | 'css/prettify-theme.css', 35 | 'css/docs.css', 36 | 'css/animations.css' 37 | ] 38 | }; 39 | }; -------------------------------------------------------------------------------- /docs/config/services/deployments/default.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function defaultDeployment(getVersion) { 4 | return { 5 | name: 'default', 6 | examples: { 7 | commonFiles: { 8 | scripts: [ '../../../angular.min.js' ] 9 | }, 10 | dependencyPath: '../../../' 11 | }, 12 | scripts: [ 13 | '../angular.min.js', 14 | '../angular-resource.min.js', 15 | '../angular-route.min.js', 16 | '../angular-cookies.min.js', 17 | '../angular-sanitize.min.js', 18 | '../angular-touch.min.js', 19 | '../angular-animate.min.js', 20 | 'components/marked-' + getVersion('marked', 'node_modules', 'package.json') + '/lib/marked.js', 21 | 'js/angular-bootstrap/bootstrap.min.js', 22 | 'js/angular-bootstrap/dropdown-toggle.min.js', 23 | 'components/lunr.js-' + getVersion('lunr.js') + '/lunr.min.js', 24 | 'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js', 25 | 'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/lang-css.js', 26 | 'js/versions-data.js', 27 | 'js/pages-data.js', 28 | 'js/nav-data.js', 29 | 'js/docs.min.js' 30 | ], 31 | stylesheets: [ 32 | 'components/bootstrap-' + getVersion('bootstrap') + '/css/bootstrap.min.css', 33 | 'components/open-sans-fontface-' + getVersion('open-sans-fontface') + '/open-sans.css', 34 | 'css/prettify-theme.css', 35 | 'css/docs.css', 36 | 'css/animations.css' 37 | ] 38 | }; 39 | }; -------------------------------------------------------------------------------- /docs/config/services/deployments/jquery.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function jqueryDeployment(getVersion) { 4 | return { 5 | name: 'jquery', 6 | examples: { 7 | commonFiles: { 8 | scripts: [ 9 | '../../components/jquery-' + getVersion('jquery') + '/jquery.js', 10 | '../../../angular.js' 11 | ] 12 | }, 13 | dependencyPath: '../../../' 14 | }, 15 | scripts: [ 16 | 'components/jquery-' + getVersion('jquery') + '/jquery.js', 17 | '../angular.min.js', 18 | '../angular-resource.min.js', 19 | '../angular-route.min.js', 20 | '../angular-cookies.min.js', 21 | '../angular-sanitize.min.js', 22 | '../angular-touch.min.js', 23 | '../angular-animate.min.js', 24 | 'components/marked-' + getVersion('marked', 'node_modules', 'package.json') + '/lib/marked.js', 25 | 'js/angular-bootstrap/bootstrap.min.js', 26 | 'js/angular-bootstrap/dropdown-toggle.min.js', 27 | 'components/lunr.js-' + getVersion('lunr.js') + '/lunr.min.js', 28 | 'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js', 29 | 'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/lang-css.js', 30 | 'js/versions-data.js', 31 | 'js/pages-data.js', 32 | 'js/nav-data.js', 33 | 'js/docs.min.js' 34 | ], 35 | stylesheets: [ 36 | 'components/bootstrap-' + getVersion('bootstrap') + '/css/bootstrap.min.css', 37 | 'components/open-sans-fontface-' + getVersion('open-sans-fontface') + '/open-sans.css', 38 | 'css/prettify-theme.css', 39 | 'css/docs.css', 40 | 'css/animations.css' 41 | ] 42 | }; 43 | }; -------------------------------------------------------------------------------- /docs/config/services/errorNamespaceMap.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var StringMap = require('stringmap'); 3 | 4 | /** 5 | * @dgService errorNamespaceMap 6 | * A map of error namespaces by name. 7 | */ 8 | module.exports = function errorNamespaceMap() { 9 | return new StringMap(); 10 | }; -------------------------------------------------------------------------------- /docs/config/services/getMinerrInfo.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var path = require('canonical-path'); 4 | 5 | /** 6 | * @dgService minErrInfo 7 | * @description 8 | * Load the error information that was generated during the AngularJS build. 9 | */ 10 | module.exports = function getMinerrInfo(readFilesProcessor) { 11 | return function() { 12 | var minerrInfoPath = path.resolve(readFilesProcessor.basePath, 'build/errors.json'); 13 | return require(minerrInfoPath); 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /docs/config/services/getVersion.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var path = require('canonical-path'); 3 | 4 | /** 5 | * dgService getVersion 6 | * @description 7 | * Find the current version of the bower component (or npm module) 8 | */ 9 | module.exports = function getVersion(readFilesProcessor) { 10 | var basePath = readFilesProcessor.basePath; 11 | 12 | return function(component, sourceFolder, packageFile) { 13 | sourceFolder = path.resolve(basePath, sourceFolder || 'docs/bower_components'); 14 | packageFile = packageFile || 'bower.json'; 15 | return require(path.join(sourceFolder,component,packageFile)).version; 16 | }; 17 | }; -------------------------------------------------------------------------------- /docs/config/services/gitData.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var versionInfo = require('../../../lib/versions/version-info'); 4 | 5 | /** 6 | * @dgService gitData 7 | * @description 8 | * Information from the local git repository 9 | */ 10 | module.exports = function gitData() { 11 | return { 12 | version: versionInfo.currentVersion, 13 | versions: versionInfo.previousVersions, 14 | info: versionInfo.gitRepoInfo 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /docs/config/tag-defs/sortOrder.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'sortOrder', 3 | transforms: function(doc, tag, value) { 4 | return parseInt(value, 10); 5 | } 6 | }; -------------------------------------------------------------------------------- /docs/config/tag-defs/tutorial-step.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'step', 3 | transforms: function(doc, tag, value) { 4 | if ( doc.docType !== 'tutorial' ) { 5 | throw new Error('Invalid tag, step. You should only use this tag on tutorial docs'); 6 | } 7 | return parseInt(value,10); 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /docs/config/templates/error.template.html: -------------------------------------------------------------------------------- 1 | {% extends "base.template.html" %} 2 | 3 | {% block content %} 4 |

Error: {$ doc.id $} 5 |
{$ doc.fullName $}
6 |

7 | 8 |
9 |
{$ doc.formattedErrorMessage $}
10 |
11 | 12 |

Description

13 |
14 | {$ doc.description | marked $} 15 |
16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /docs/config/templates/errorNamespace.template.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.template.html' %} 2 | 3 | {% block content %} 4 |

{$ doc.name $}

5 | 6 |
7 | Here are the list of errors in the {$ doc.name $} namespace. 8 | 9 |
10 | 11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | {% for errorDoc in doc.errors -%} 19 | 20 | 21 | 22 | 23 | {% endfor %} 24 |
NameDescription
{$ errorDoc.name $}{$ errorDoc.fullName $}
25 |
26 |
27 | 28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /docs/config/templates/json-doc.template.json: -------------------------------------------------------------------------------- 1 | {$ doc.data | json $} -------------------------------------------------------------------------------- /docs/config/templates/nav-data.template.js: -------------------------------------------------------------------------------- 1 | // Meta data used by the AngularJS docs app 2 | angular.module('navData', []) 3 | .value('NG_NAVIGATION', {$ doc.areas | json $}); 4 | -------------------------------------------------------------------------------- /docs/config/templates/pages-data.template.js: -------------------------------------------------------------------------------- 1 | // Meta data used by the AngularJS docs app 2 | angular.module('pagesData', []) 3 | .value('NG_PAGES', {$ doc.pages | json $}); 4 | -------------------------------------------------------------------------------- /docs/config/templates/runnableExample.template.html: -------------------------------------------------------------------------------- 1 | {# Be aware that we need these extra new lines here or marked will not realise that the
2 | is HTML and wrap each line in a

- thus breaking the HTML #} 3 | 4 |

5 | 6 |   7 | Edit in Plunker 8 | 9 |
13 | 14 | {% for fileName, file in doc.example.files %} 15 |
17 | {% code -%} 18 | {$ file.fileContents $} 19 | {%- endcode %} 20 |
21 | {% endfor %} 22 | 23 | 24 |
25 |
26 | 27 | {# Be aware that we need these extra new lines here or marked will not realise that the
28 | above is HTML and wrap each line in a

- thus breaking the HTML #} 29 | -------------------------------------------------------------------------------- /docs/config/templates/tutorial.template.html: -------------------------------------------------------------------------------- 1 | {% include 'overview.template.html' %} 2 | -------------------------------------------------------------------------------- /docs/config/templates/versions-data.template.js: -------------------------------------------------------------------------------- 1 | // Meta data used by the AngularJS docs app 2 | angular.module('versionsData', []) 3 | .value('NG_VERSION', {$ doc.currentVersion | json $}) 4 | .value('NG_VERSIONS', {$ doc.versions | json $}); 5 | -------------------------------------------------------------------------------- /docs/content/error/$animate/notcsel.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $animate:notcsel 3 | @fullName Not class CSS selector 4 | @description 5 | 6 | Expecting a CSS selector for class. Class selectors must start with `.`, for example: `.my-class-name`. 7 | -------------------------------------------------------------------------------- /docs/content/error/$cacheFactory/iid.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $cacheFactory:iid 3 | @fullName Invalid ID 4 | @description 5 | 6 | This error occurs when trying to create a new `cache` object via {@link ng.$cacheFactory} with an ID that was already used to create another cache object. 7 | 8 | To resolve the error please use a different cache ID when calling `$cacheFactory`. 9 | -------------------------------------------------------------------------------- /docs/content/error/$compile/ctreq.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:ctreq 3 | @fullName Missing Required Controller 4 | @description 5 | 6 | This error occurs when {@link ng.$compile HTML compiler} tries to process a directive that specifies the {@link ng.$compile#directive-definition-object `require` option} in a {@link ng.$compile#comprehensive-directive-api directive definition}, 7 | but the required directive controller is not present on the current DOM element (or its ancestor element, if `^` was specified). 8 | 9 | To resolve this error ensure that there is no typo in the required controller name and that the required directive controller is present on the current element. 10 | 11 | If the required controller is expected to be on a ancestor element, make sure that you prefix the controller name in the `require` definition with `^`. 12 | 13 | If the required controller is optionally requested, use `?` or `^?` to specify that. 14 | 15 | 16 | Example of a directive that requires {@link ng.directive:ngModel ngModel} controller: 17 | ``` 18 | myApp.directive('myDirective', function() { 19 | return { 20 | require: 'ngModel', 21 | ... 22 | } 23 | } 24 | ``` 25 | 26 | This directive can then be used as: 27 | ``` 28 | 29 | ``` 30 | 31 | 32 | Example of a directive that optionally requires a {@link ng.directive:form form} controller from an ancestor: 33 | ``` 34 | myApp.directive('myDirective', function() { 35 | return { 36 | require: '^?form', 37 | ... 38 | } 39 | } 40 | ``` 41 | 42 | This directive can then be used as: 43 | ``` 44 |

45 |
46 | 47 |
48 |
49 | ``` 50 | -------------------------------------------------------------------------------- /docs/content/error/$compile/iscp.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:iscp 3 | @fullName Invalid Isolate Scope Definition 4 | @description 5 | 6 | When declaring isolate scope the scope definition object must be in specific format which starts with mode character (`@&=`) with an optional local name. 7 | 8 | ``` 9 | myModule.directive('directiveName', function factory() { 10 | return { 11 | ... 12 | scope: { 13 | 'attrName': '@', // OK 14 | 'attrName2': '=localName', // OK 15 | 'attrName3': 'name', // ERROR: missing mode @&= 16 | 'attrName4': ' = name', // ERROR: extra spaces 17 | 'attrName5': 'name=', // ERROR: must be prefixed with @&= 18 | } 19 | ... 20 | } 21 | }); 22 | ``` 23 | 24 | Please refer to the {@link ng.$compile#directive-definition-object 25 | `scope` option} of the directive definition documentation to learn more about the API. 26 | -------------------------------------------------------------------------------- /docs/content/error/$compile/multidir.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:multidir 3 | @fullName Multiple Directive Resource Contention 4 | @description 5 | 6 | This error occurs when multiple directives are applied to the same DOM element, and 7 | processing them would result in a collision or an unsupported configuration. 8 | 9 | 10 | To resolve this issue remove one of the directives which is causing the collision. 11 | 12 | Example scenarios of multiple incompatible directives applied to the same element include: 13 | 14 | * Multiple directives requesting `isolated scope`. 15 | * Multiple directives publishing a controller under the same name. 16 | * Multiple directives declared with the `transclusion` option. 17 | * Multiple directives attempting to define a `template` or `templateURL`. 18 | -------------------------------------------------------------------------------- /docs/content/error/$compile/noctrl.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:noctrl 3 | @fullName Controller is required. 4 | @description 5 | 6 | When using the `bindToController` feature of AngularJS, a directive is required 7 | to have a Controller. A controller may be specified by adding a "controller" 8 | property to the directive definition object. Its value should be either a 9 | string, or an invokable object (a function, or an array whose last element is a 10 | function). 11 | 12 | For more information, see the {@link guide/directive directives guide}. 13 | -------------------------------------------------------------------------------- /docs/content/error/$compile/nodomevents.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:nodomevents 3 | @fullName Interpolated Event Attributes 4 | @description 5 | 6 | This error occurs when one tries to create a binding for event handler attributes like `onclick`, `onload`, `onsubmit`, etc. 7 | 8 | There is no practical value in binding to these attributes and doing so only exposes your application to security vulnerabilities like XSS. 9 | For these reasons binding to event handler attributes (all attributes that start with `on` and `formaction` attribute) is not supported. 10 | 11 | 12 | An example code that would allow XSS vulnerability by evaluating user input in the window context could look like this: 13 | ``` 14 | 15 |
click me
16 | ``` 17 | 18 | Since the `onclick` evaluates the value as JavaScript code in the window context, setting the `username` model to a value like `javascript:alert('PWND')` would result in script injection when the `div` is clicked. 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/content/error/$compile/nonassign.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:nonassign 3 | @fullName Non-Assignable Expression 4 | @description 5 | 6 | This error occurs when a directive defines an isolate scope property 7 | (using the `=` mode in the {@link ng.$compile#directive-definition-object 8 | `scope` option} of a directive definition) but the directive is used with an expression that is not-assignable. 9 | 10 | In order for the two-way data-binding to work, it must be possible to write new values back into the path defined with the expression. 11 | 12 | For example, given a directive: 13 | 14 | ``` 15 | myModule.directive('myDirective', function factory() { 16 | return { 17 | ... 18 | scope: { 19 | localValue: '=bind' 20 | } 21 | ... 22 | } 23 | }); 24 | ``` 25 | 26 | Following are invalid uses of this directive: 27 | ``` 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ``` 37 | 38 | 39 | To resolve this error, always use path expressions with scope properties that are two-way data-bound: 40 | ``` 41 | 42 | 43 | ``` 44 | 45 | -------------------------------------------------------------------------------- /docs/content/error/$compile/selmulti.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:selmulti 3 | @fullName Binding to Multiple Attribute 4 | @description 5 | 6 | Binding to the `multiple` attribute of `select` element is not supported since switching between multiple and single mode changes the {@link ng.directive:ngModel `ngModel`} object type from instance to array of instances which breaks the model semantics. 7 | 8 | If you need to use different types of `select` elements in your template based on some variable, please use {@link ng.directive:ngIf ngIf} or {@link ng.directive:ngSwitch ngSwitch} directives to select one of them to be used at runtime. 9 | 10 | 11 | Example with invalid usage: 12 | ``` 13 | 14 | ``` 15 | 16 | Example that uses ngIf to pick one of the `select` elements based on a variable: 17 | ``` 18 | 19 | 20 | ``` 21 | -------------------------------------------------------------------------------- /docs/content/error/$compile/tpload.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:tpload 3 | @fullName Error Loading Template 4 | @description 5 | 6 | This error occurs when {@link ng.$compile `$compile`} attempts to fetch a template from some URL, and the request fails. 7 | 8 | To resolve this error, ensure that the URL of the template is spelled correctly and resolves to correct absolute URL. 9 | The [Chrome Developer Tools](https://developers.google.com/chrome-developer-tools/docs/network#network_panel_overview) might also be helpful in determining why the request failed. 10 | 11 | If you are using {@link ng.$templateCache} to pre-load templates, ensure that the cache was populated with the template. 12 | -------------------------------------------------------------------------------- /docs/content/error/$compile/uterdir.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $compile:uterdir 3 | @fullName Unterminated Directive 4 | @description 5 | 6 | This error occurs when using multi-element directives and a `directive-start` attribute fails to form a matching pair with a corresponding `directive-end` attribute. 7 | A `directive-start` should have a matching `directive-end` on a sibling node in the DOM. For instance, 8 | 9 | ``` 10 | 11 | I get repeated 12 | I also get repeated 13 |
14 | ``` 15 | 16 | is a valid example. 17 | 18 | This error can occur in several different ways. One is by leaving out the `directive-end` attribute, like so: 19 | 20 | ``` 21 |
22 | 23 |
24 | ``` 25 | 26 | Another is by nesting a `directive-end` inside of `directive-start`, or vice versa: 27 | 28 | ``` 29 |
30 | 31 |
32 | ``` 33 | 34 | To avoid this error, make sure each `directive-start` you use has a matching `directive-end` on a sibling node in the DOM. 35 | -------------------------------------------------------------------------------- /docs/content/error/$controller/ctrlfmt.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $controller:ctrlfmt 3 | @fullName Badly formed controller string 4 | @description 5 | 6 | This error occurs when {@link ng.$controller $controller} service is called 7 | with a string that does not match the supported controller string formats. 8 | 9 | Supported formats: 10 | 11 | 1. `__name__` 12 | 2. `__name__ as __identifier__` 13 | 14 | N'either `__name__` or `__identifier__` may contain spaces. 15 | 16 | Example of incorrect usage that leads to this error: 17 | ```html 18 | 19 |
` tag, loader like 11 | require.js, or testing harness like karma). 12 | 13 | A less common reason for this error is trying to "re-open" a module that has not yet been defined. 14 | 15 | To define a new module, call {@link angular.module angular.module} with a name 16 | and an array of dependent modules, like so: 17 | 18 | ```js 19 | // When defining a module with no module dependencies, 20 | // the array of dependencies should be defined and empty. 21 | var myApp = angular.module('myApp', []); 22 | ``` 23 | 24 | To retrieve a reference to the same module for further configuration, call 25 | `angular.module` without the array argument. 26 | 27 | ```js 28 | var myApp = angular.module('myApp'); 29 | ``` 30 | 31 | Calling `angular.module` without the array of dependencies when the module has not yet been defined 32 | causes this error to be thrown. To fix it, define your module with a name and an empty array, as in 33 | the first example above. 34 | -------------------------------------------------------------------------------- /docs/content/error/$injector/pget.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $injector:pget 3 | @fullName Provider Missing $get 4 | @description 5 | 6 | This error occurs when attempting to register a provider that does not have a 7 | `$get` method. For example: 8 | 9 | ``` 10 | function BadProvider() {} // No $get method! 11 | angular.module("myApp", []) 12 | .provider('bad', BadProvider); // this throws the error 13 | ``` 14 | 15 | To fix the error, fill in the `$get` method on the provider like so: 16 | 17 | ``` 18 | function GoodProvider() { 19 | this.$get = angular.noop; 20 | } 21 | angular.module("myApp", []) 22 | .provider('good', GoodProvider); 23 | ``` 24 | 25 | For more information, refer to the {@link auto.$provide#provider 26 | $provide.provider} api doc. 27 | -------------------------------------------------------------------------------- /docs/content/error/$injector/strictdi.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $injector:strictdi 3 | @fullName Explicit annotation required 4 | @description 5 | 6 | This error occurs when attempting to invoke a function or provider which 7 | has not been explicitly annotated, while the application is running with 8 | strict-di mode enabled. 9 | 10 | For example: 11 | 12 | ``` 13 | angular.module("myApp", []) 14 | // BadController cannot be invoked, because 15 | // the dependencies to be injected are not 16 | // explicitly listed. 17 | .controller("BadController", function($scope, $http, $filter) { 18 | // ... 19 | }); 20 | ``` 21 | 22 | To fix the error, explicitly annotate the function using either the inline 23 | bracket notation, or with the $inject property: 24 | 25 | ``` 26 | function GoodController1($scope, $http, $filter) { 27 | // ... 28 | } 29 | GoodController1.$inject = ["$scope", "$http", "$filter"]; 30 | 31 | angular.module("myApp", []) 32 | // GoodController1 can be invoked because it 33 | // had an $inject property, which is an array 34 | // containing the dependency names to be 35 | // injected. 36 | .controller("GoodController1", GoodController1) 37 | 38 | // GoodController2 can also be invoked, because 39 | // the dependencies to inject are listed, in 40 | // order, in the array, with the function to be 41 | // invoked trailing on the end. 42 | .controller("GoodController2", [ 43 | "$scope", 44 | "$http", 45 | "$filter", 46 | function($scope, $http, $filter) { 47 | // ... 48 | } 49 | ]); 50 | 51 | ``` 52 | 53 | For more information about strict-di mode, see {@link ng.directive:ngApp ngApp} 54 | and {@link angular.bootstrap angular.bootstrap}. 55 | -------------------------------------------------------------------------------- /docs/content/error/$injector/undef.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $injector:undef 3 | @fullName Undefined Value 4 | @description 5 | 6 | This error results from registering a factory which does not return a value (or whose return value is undefined). 7 | 8 | The following is an example of a factory which will throw this error upon injection: 9 | 10 | ```js 11 | angular.module("badModule", []). 12 | factory("badFactory", function() { 13 | doLotsOfThings(); 14 | butDontReturnAValue(); 15 | }); 16 | ``` 17 | 18 | In order to prevent the error, return a value of some sort, such as an object which exposes an API for working 19 | with the injected object. 20 | 21 | ```js 22 | angular.module("goodModule", []). 23 | factory("goodFactory", function() { 24 | doLotsOfThings(); 25 | butDontReturnAValue(); 26 | 27 | return { 28 | doTheThing: function methodThatDoesAThing() { 29 | } 30 | }; 31 | }); 32 | ``` 33 | 34 | -------------------------------------------------------------------------------- /docs/content/error/$interpolate/interr.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $interpolate:interr 3 | @fullName Interpolation Error 4 | @description 5 | 6 | This error occurs when interpolation fails due to some exception. The error 7 | message above should provide additional context. 8 | -------------------------------------------------------------------------------- /docs/content/error/$interpolate/noconcat.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $interpolate:noconcat 3 | @fullName Multiple Expressions 4 | @description 5 | 6 | This error occurs when performing an interpolation that concatenates multiple 7 | expressions when a trusted value is required. Concatenating expressions makes 8 | it hard to reason about whether some combination of concatenated values are 9 | unsafe to use and could easily lead to XSS. 10 | 11 | For more information about how AngularJS helps keep your app secure, refer to 12 | the {@link ng.$sce $sce} API doc. 13 | -------------------------------------------------------------------------------- /docs/content/error/$location/ipthprfx.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $location:ipthprfx 3 | @fullName Invalid or Missing Path Prefix 4 | @description 5 | 6 | This error occurs when you configure the {@link ng.$location `$location`} service in the html5 mode, specify a base url for your application via `` element and try to update the location with a path that doesn't match the base prefix. 7 | 8 | To resolve this issue, please check the base url specified via the `` tag in the head of your main html document, as well as the url that you tried to set the location to. 9 | -------------------------------------------------------------------------------- /docs/content/error/$location/isrcharg.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $location:isrcharg 3 | @fullName Wrong $location.search() argument type 4 | @description 5 | 6 | To resolve this error, ensure that the first argument for the `$location.search` call is a `string` or an object. 7 | You can use the stack trace associated with this error to identify the call site that caused this issue. 8 | 9 | To learn more, please consult the {@link ng.$location `$location`} api docs. 10 | -------------------------------------------------------------------------------- /docs/content/error/$location/nostate.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $location:nostate 3 | @fullName History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API 4 | @description 5 | 6 | This error occurs when the {@link ng.$location#state $location.state} method is used when {@link ng.$locationProvider#html5Mode $locationProvider.html5Mode} is not turned on or the browser used doesn't support the HTML5 History API (for example, IE9 or Android 2.3). 7 | 8 | To avoid this error, either drop support for those older browsers or avoid using this method. 9 | -------------------------------------------------------------------------------- /docs/content/error/$parse/isecff.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $parse:isecff 3 | @fullName Referencing 'call', 'apply' and 'bind' Disallowed 4 | @description 5 | 6 | Occurs when an expression attempts to invoke Function's 'call', 'apply' or 'bind'. 7 | 8 | Angular bans the invocation of 'call', 'apply' and 'bind' from within expressions 9 | since access is a known way to modify the behaviour of existing functions. 10 | 11 | To resolve this error, avoid using these methods in expressions. 12 | 13 | Example expression that would result in this error: 14 | 15 | ``` 16 |
{{user.sendInfo.call({}, true)}}
17 | ``` 18 | -------------------------------------------------------------------------------- /docs/content/error/$parse/isecfld.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $parse:isecfld 3 | @fullName Referencing Disallowed Field in Expression 4 | @description 5 | 6 | Occurs when an expression attempts to access one of the following fields: 7 | 8 | * __proto__ 9 | * __defineGetter__ 10 | * __defineSetter__ 11 | * __lookupGetter__ 12 | * __lookupSetter__ 13 | 14 | AngularJS bans access to these fields from within expressions since 15 | access is a known way to mess with native objects or 16 | to execute arbitrary Javascript code. 17 | 18 | To resolve this error, avoid using these fields in expressions. As a last resort, 19 | alias their value and access them through the alias instead. 20 | 21 | Example expressions that would result in this error: 22 | 23 | ``` 24 |
{{user.__proto__.hasOwnProperty = $emit}}
25 | 26 |
{{user.__defineGetter__('name', noop)}}
27 | ``` 28 | -------------------------------------------------------------------------------- /docs/content/error/$parse/isecfn.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $parse:isecfn 3 | @fullName Referencing Function Disallowed 4 | @description 5 | 6 | Occurs when an expression attempts to access the 'Function' object (constructor for all functions in JavaScript). 7 | 8 | Angular bans access to Function from within expressions since constructor access is a known way to execute arbitrary Javascript code. 9 | 10 | To resolve this error, avoid Function access. 11 | -------------------------------------------------------------------------------- /docs/content/error/$parse/isecobj.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $parse:isecobj 3 | @fullName Referencing Object Disallowed 4 | @description 5 | 6 | Occurs when an expression attempts to access the 'Object' object (Root object in JavaScript). 7 | 8 | Angular bans access to Object from within expressions since access is a known way to modify 9 | the behaviour of existing objects. 10 | 11 | To resolve this error, avoid Object access. 12 | -------------------------------------------------------------------------------- /docs/content/error/$parse/isecwindow.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $parse:isecwindow 3 | @fullName Referencing Window object in Expression 4 | @description 5 | 6 | Occurs when an expression attempts to access a Window object. 7 | 8 | AngularJS restricts access to the Window object from within expressions since it's a known way to 9 | execute arbitrary Javascript code. 10 | 11 | This check is only performed on object index and function calls in Angular expressions. These are 12 | places that are harder for the developer to guard. Dotted member access (such as a.b.c) does not 13 | perform this check - it's up to the developer to not expose such sensitive and powerful objects 14 | directly on the scope chain. 15 | 16 | To resolve this error, avoid Window access. 17 | -------------------------------------------------------------------------------- /docs/content/error/$parse/lexerr.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $parse:lexerr 3 | @fullName Lexer Error 4 | @description 5 | 6 | Occurs when an expression has a lexical error, for example a malformed number (0.5e-) or an invalid unicode escape. 7 | 8 | The error message contains a more precise error. 9 | 10 | To resolve, learn more about {@link guide/expression Angular expressions}, identify the error and fix the expression's syntax. 11 | -------------------------------------------------------------------------------- /docs/content/error/$parse/syntax.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $parse:syntax 3 | @fullName Syntax Error 4 | @description 5 | 6 | Occurs when there is a syntax error in an expression. These errors are thrown while compiling the expression. 7 | The error message contains a more precise description of the error, including the location (column) in the expression where the error occurred. 8 | 9 | To resolve, learn more about {@link guide/expression Angular expressions}, identify the error and fix the expression's syntax. 10 | -------------------------------------------------------------------------------- /docs/content/error/$parse/ueoe.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $parse:ueoe 3 | @fullName Unexpected End of Expression 4 | @description 5 | 6 | Occurs when an expression is missing tokens at the end of the expression. 7 | For example, forgetting a closing bracket in an expression will trigger this error. 8 | 9 | To resolve, learn more about {@link guide/expression Angular expressions}, identify the error and fix the expression's syntax. 10 | -------------------------------------------------------------------------------- /docs/content/error/$q/norslvr.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $q:norslvr 3 | @fullName No resolver function passed to $Q 4 | @description 5 | 6 | Occurs when calling creating a promise using {@link $q} as a constructor, without providing the 7 | required `resolver` function. 8 | 9 | ``` 10 | //bad 11 | var promise = $q().then(doSomething); 12 | 13 | //good 14 | var promise = $q(function(resolve, reject) { 15 | waitForSomethingAsync.then(resolve); 16 | }).then(doSomething); 17 | ``` 18 | -------------------------------------------------------------------------------- /docs/content/error/$q/qcycle.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $q:qcycle 3 | @fullName Cannot resolve a promise with itself 4 | @description 5 | 6 | Occurs when resolving a promise with itself as the value, including returning the promise in a 7 | function passed to `then`. The A+ 1.1 spec mandates that this behavior throw a TypeError. 8 | https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure 9 | 10 | ``` 11 | var promise = $q.defer().promise; 12 | 13 | //bad 14 | promise.then(function (val) { 15 | //Cannot return self 16 | return promise; 17 | }); 18 | 19 | //good 20 | promise.then(function (val) { 21 | return 'some other value'; 22 | }); 23 | ``` 24 | -------------------------------------------------------------------------------- /docs/content/error/$resource/badargs.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $resource:badargs 3 | @fullName Too Many Arguments 4 | @description 5 | 6 | This error occurs when specifying too many arguments to a {@link ngResource.$resource `$resource`} action, such as `get`, `query` or any user-defined custom action. 7 | These actions may take up to 4 arguments. 8 | 9 | For more information, refer to the {@link ngResource.$resource `$resource`} API reference documentation. 10 | -------------------------------------------------------------------------------- /docs/content/error/$resource/badcfg.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $resource:badcfg 3 | @fullName Response does not match configured parameter 4 | @description 5 | 6 | This error occurs when the {@link ngResource.$resource `$resource`} service expects a response that can be deserialized as an array but receives an object, or vice versa. 7 | By default, all resource actions expect objects, except `query` which expects arrays. 8 | 9 | To resolve this error, make sure your `$resource` configuration matches the actual format of the data returned from the server. 10 | 11 | For more information, see the {@link ngResource.$resource `$resource`} API reference documentation. 12 | -------------------------------------------------------------------------------- /docs/content/error/$resource/badmember.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $resource:badmember 3 | @fullName Syntax error in param value using @member lookup 4 | @description 5 | 6 | Occurs when there is a syntax error when attempting to extract a param 7 | value from the data object. 8 | 9 | Here's an example of valid syntax for `params` or `paramsDefault`: 10 | 11 | ````javascript 12 | { 13 | bar: '@foo.bar' 14 | } 15 | ```` 16 | 17 | The part following the `@`, `foo.bar` in this case, should be a simple 18 | dotted member lookup using only ASCII identifiers. This error occurs 19 | when there is an error in that expression. The following are all syntax 20 | errors 21 | 22 | | Value | Error | 23 | |---------|----------------| 24 | | `@` | Empty expression following `@`. | 25 | | `@1.a` | `1` is an invalid javascript identifier. | 26 | | `@.a` | Leading `.` is invalid. | 27 | | `@a[1]` | Only dotted lookups are supported (no index operator) | 28 | -------------------------------------------------------------------------------- /docs/content/error/$resource/badname.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $resource:badname 3 | @fullName Cannot use hasOwnProperty as a parameter name 4 | @description 5 | 6 | Occurs when you try to use the name `hasOwnProperty` as a name of a parameter. 7 | Generally, a name cannot be `hasOwnProperty` because it is used, internally, on a object 8 | and allowing such a name would break lookups on this object. 9 | -------------------------------------------------------------------------------- /docs/content/error/$rootScope/infdig.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $rootScope:infdig 3 | @fullName Infinite $digest Loop 4 | @description 5 | 6 | This error occurs when the application's model becomes unstable and each `$digest` cycle triggers a state change and subsequent `$digest` cycle. 7 | Angular detects this situation and prevents an infinite loop from causing the browser to become unresponsive. 8 | 9 | For example, the situation can occur by setting up a watch on a path and subsequently updating the same path when the value changes. 10 | 11 | ``` 12 | $scope.$watch('foo', function() { 13 | $scope.foo = $scope.foo + 1; 14 | }); 15 | ``` 16 | 17 | One common mistake is binding to a function which generates a new array every time it is called. For example: 18 | 19 | ``` 20 |
{{ user.name }}
21 | 22 | ... 23 | 24 | $scope.getUsers = function() { 25 | return [ { name: 'Hank' }, { name: 'Francisco' } ]; 26 | }; 27 | ``` 28 | 29 | Since `getUsers()` returns a new array, Angular determines that the model is different on each `$digest` 30 | cycle, resulting in the error. The solution is to return the same array object if the elements have 31 | not changed: 32 | 33 | ``` 34 | var users = [ { name: 'Hank' }, { name: 'Francisco' } ]; 35 | 36 | $scope.getUsers = function() { 37 | return users; 38 | }; 39 | ``` 40 | 41 | The maximum number of allowed iterations of the `$digest` cycle is controlled via TTL setting which can be configured via {@link ng.$rootScopeProvider $rootScopeProvider}. 42 | -------------------------------------------------------------------------------- /docs/content/error/$sanitize/badparse.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $sanitize:badparse 3 | @fullName Parsing Error while Sanitizing 4 | @description 5 | 6 | This error occurs when the HTML string passed to '$sanitize' can't be parsed by the sanitizer. 7 | The error contains part of the html string that can't be parsed. 8 | 9 | The parser is more strict than a typical browser parser, so it's possible that some obscure input would produce this error despite the string being recognized as valid HTML by a browser. 10 | 11 | If a valid html code results in this error, please file a bug. 12 | -------------------------------------------------------------------------------- /docs/content/error/$sce/icontext.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $sce:icontext 3 | @fullName Invalid / Unknown SCE context 4 | @description 5 | 6 | The context enum passed to {@link ng.$sce#trustAs $sce.trustAs} was not recognized. 7 | 8 | Please consult the list of {@link ng.$sce#contexts supported Strict Contextual Escaping (SCE) contexts}. 9 | -------------------------------------------------------------------------------- /docs/content/error/$sce/iequirks.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $sce:iequirks 3 | @fullName IE<11 in quirks mode is unsupported 4 | @description 5 | 6 | This error occurs when you are using AngularJS with {@link ng.$sce Strict Contextual Escaping (SCE)} mode enabled (the default) on IE10 or lower in quirks mode. 7 | 8 | In this mode, IE<11 allow one to execute arbitrary javascript by the use of the `expression()` syntax and is not supported. 9 | Refer 10 | [CSS expressions no longer supported for the Internet zone](http://msdn.microsoft.com/en-us/library/ie/dn384050(v=vs.85).aspx) 11 | to learn more about them. 12 | 13 | To resolve this error please specify the proper doctype at the top of your main html document: 14 | 15 | ``` 16 | 17 | ``` 18 | -------------------------------------------------------------------------------- /docs/content/error/$sce/imatcher.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $sce:imatcher 3 | @fullName Invalid matcher (only string patterns and RegExp instances are supported) 4 | @description 5 | 6 | Please see {@link $sceDelegateProvider#resourceUrlWhitelist 7 | $sceDelegateProvider.resourceUrlWhitelist} and {@link 8 | $sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} for the 9 | list of acceptable items. 10 | -------------------------------------------------------------------------------- /docs/content/error/$sce/insecurl.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $sce:insecurl 3 | @fullName Processing of a Resource from Untrusted Source Blocked 4 | @description 5 | 6 | AngularJS' {@link ng.$sce Strict Contextual Escaping (SCE)} mode (enabled by default) has blocked loading a resource from an insecure URL. 7 | 8 | Typically, this would occur if you're attempting to load an Angular template from an untrusted source. 9 | It's also possible that a custom directive threw this error for a similar reason. 10 | 11 | Angular only loads templates from trusted URLs (by calling {@link ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl} on the template URL). 12 | 13 | By default, only URLs that belong to the same origin are trusted. These are urls with the same domain, protocol and port as the application document. 14 | 15 | The {@link ng.directive:ngInclude ngInclude} directive and {@link guide/directive directives} that specify a `templateUrl` require a trusted resource URL. 16 | 17 | To load templates from other domains and/or protocols, either adjust the {@link 18 | ng.$sceDelegateProvider#resourceUrlWhitelist whitelist}/ {@link 19 | ng.$sceDelegateProvider#resourceUrlBlacklist blacklist} or wrap the URL with a call to {@link 20 | ng.$sce#trustAsResourceUrl $sce.trustAsResourceUrl}. 21 | 22 | **Note**: The browser's [Same Origin 23 | Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest) and 24 | [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/) policy apply 25 | that may further restrict whether the template is successfully loaded. (e.g. neither cross-domain 26 | requests won't work on all browsers nor `file://` requests on some browsers) 27 | -------------------------------------------------------------------------------- /docs/content/error/$sce/itype.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $sce:itype 3 | @fullName String Value is Required for SCE Trust Call 4 | @description 5 | 6 | {@link ng.$sce#trustAs $sce.trustAs} requires a string value. 7 | 8 | Read more about {@link ng.$sce Strict Contextual Escaping (SCE)} in AngularJS. 9 | -------------------------------------------------------------------------------- /docs/content/error/$sce/iwcard.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $sce:iwcard 3 | @fullName The sequence *** is not a valid pattern wildcard 4 | @description 5 | 6 | The strings in {@link $sceDelegateProvider#resourceUrlWhitelist 7 | $sceDelegateProvider.resourceUrlWhitelist} and {@link 8 | $sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} may not 9 | contain the undefined sequence `***`. Only `*` and `**` wildcard patterns are defined. 10 | -------------------------------------------------------------------------------- /docs/content/error/$sce/unsafe.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name $sce:unsafe 3 | @fullName Require a safe/trusted value 4 | @description 5 | 6 | The value provided for use in a specific context was not found to be safe/trusted for use. 7 | 8 | Angular's {@link ng.$sce Strict Contextual Escaping (SCE)} mode 9 | (enabled by default), requires bindings in certain 10 | contexts to result in a value that is trusted as safe for use in such a context. (e.g. loading an 11 | Angular template from a URL requires that the URL is one considered safe for loading resources.) 12 | 13 | This helps prevent XSS and other security issues. Read more at 14 | {@link ng.$sce Strict Contextual Escaping (SCE)} 15 | 16 | You may want to include the ngSanitize module to use the automatic sanitizing. 17 | -------------------------------------------------------------------------------- /docs/content/error/filter/notarray.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name filter:notarray 3 | @fullName Not an array 4 | @description 5 | 6 | This error occurs when {@link ng.filter filter} is not used with an array: 7 | ```html 8 | 9 |
10 | {{ key }} : {{ value }} 11 |
12 | ``` 13 | 14 | Filter must be used with an array so a subset of items can be returned. 15 | The array can be initialized asynchronously and therefore null or undefined won't throw this error. 16 | 17 | To filter an object by the value of its properties you can create your own custom filter: 18 | ```js 19 | angular.module('customFilter',[]) 20 | .filter('custom', function() { 21 | return function(input, search) { 22 | if (!input) return input; 23 | if (!search) return input; 24 | var expected = ('' + search).toLowerCase(); 25 | var result = {}; 26 | angular.forEach(input, function(value, key) { 27 | var actual = ('' + value).toLowerCase(); 28 | if (actual.indexOf(expected) !== -1) { 29 | result[key] = value; 30 | } 31 | }); 32 | return result; 33 | } 34 | }); 35 | ``` 36 | That can be used as: 37 | ```html 38 | 39 |
40 | {{ key }} : {{ value }} 41 |
42 | ``` 43 | 44 | You could as well convert the object to an array using a filter such as 45 | [toArrayFilter](https://github.com/petebacondarwin/angular-toArrayFilter): 46 | ```html 47 | 48 |
49 | {{ item }} 50 |
51 | ``` 52 | -------------------------------------------------------------------------------- /docs/content/error/index.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc overview 2 | @name Error Reference 3 | @description 4 | 5 | # Error Reference 6 | 7 | Use the Error Reference manual to find information about error conditions in 8 | your AngularJS app. Errors thrown in production builds of AngularJS will log 9 | links to this site on the console. 10 | 11 | Other useful references for debugging your app include: 12 | 13 | - {@link api/ API Reference} for detailed information about specific features 14 | - {@link guide/ Developer Guide} for AngularJS concepts 15 | - {@link tutorial/ Tutorial} for getting started 16 | -------------------------------------------------------------------------------- /docs/content/error/jqLite/nosel.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name jqLite:nosel 3 | @fullName Unsupported Selector Lookup 4 | @description 5 | 6 | In order to keep Angular small, Angular implements only a subset of the selectors in {@link angular.element#angular-s-jqlite jqLite}. 7 | This error occurs when a jqLite instance is invoked with a selector other than this subset. 8 | 9 | In order to resolve this error, rewrite your code to only use tag name selectors and manually traverse the DOM using the APIs provided by jqLite. 10 | 11 | Alternatively, you can include a full version of jQuery, which Angular will automatically use and that will make all selectors available. 12 | -------------------------------------------------------------------------------- /docs/content/error/jqLite/offargs.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name jqLite:offargs 3 | @fullName Invalid jqLite#off() parameter 4 | @description 5 | 6 | This error occurs when trying to pass too many arguments to `jqLite#off`. Note 7 | that `jqLite#off` does not support namespaces or selectors like jQuery. 8 | -------------------------------------------------------------------------------- /docs/content/error/jqLite/onargs.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name jqLite:onargs 3 | @fullName Invalid jqLite#on() Parameters 4 | @description 5 | 6 | This error occurs when trying to pass too many arguments to `jqLite#on`. Note 7 | that `jqLite#on` does not support the `selector` or `eventData` parameters as 8 | jQuery does. 9 | -------------------------------------------------------------------------------- /docs/content/error/ng/areq.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ng:areq 3 | @fullName Bad Argument 4 | @description 5 | 6 | AngularJS often asserts that certain values will be present and truthy using a 7 | helper function. If the assertion fails, this error is thrown. To fix this problem, 8 | make sure that the value the assertion expects is defined and truthy. 9 | -------------------------------------------------------------------------------- /docs/content/error/ng/badname.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ng:badname 3 | @fullName Bad `hasOwnProperty` Name 4 | @description 5 | 6 | Occurs when you try to use the name `hasOwnProperty` in a context where it is not allowed. 7 | Generally, a name cannot be `hasOwnProperty` because it is used, internally, on a object 8 | and allowing such a name would break lookups on this object. 9 | -------------------------------------------------------------------------------- /docs/content/error/ng/btstrpd.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ng:btstrpd 3 | @fullName App Already Bootstrapped with this Element 4 | @description 5 | 6 | Occurs when calling {@link angular.bootstrap} on an element that has already been bootstrapped. 7 | 8 | This usually happens when you accidentally use both `ng-app` and `angular.bootstrap` to bootstrap an 9 | application. 10 | 11 | 12 | ``` 13 | 14 | ... 15 | 16 | 19 | 20 | 21 | ``` 22 | 23 | Note that for bootstrapping purposes, the `` element is the same as `document`, so the following 24 | will also throw an error. 25 | 26 | ``` 27 | 28 | ... 29 | 32 | 33 | ``` 34 | 35 | You can also get this error if you accidentally load AngularJS itself more than once. 36 | 37 | ``` 38 | 39 | 40 | 41 | 42 | ... 43 | 44 | 45 | 46 | 47 | ... 48 | 49 | 50 | 51 | 52 | ``` 53 | -------------------------------------------------------------------------------- /docs/content/error/ng/cpi.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ng:cpi 3 | @fullName Bad Copy 4 | @description 5 | 6 | This error occurs when attempting to copy an object to itself. Calling {@link 7 | angular.copy angular.copy} with a `destination` object deletes 8 | all of the elements or properties on `destination` before copying to it. Copying 9 | an object to itself is not supported. Make sure to check your calls to 10 | `angular.copy` and avoid copying objects or arrays to themselves. 11 | -------------------------------------------------------------------------------- /docs/content/error/ng/cpta.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ng:cpta 3 | @fullName Copying TypedArray 4 | @description 5 | 6 | Copying TypedArray's with a destination is not supported because TypedArray 7 | objects can not be mutated, they are fixed length. 8 | -------------------------------------------------------------------------------- /docs/content/error/ng/cpws.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ng:cpws 3 | @fullName Copying Window or Scope 4 | @description 5 | 6 | Copying Window or Scope instances is not supported because of cyclical and self 7 | references. Avoid copying windows and scopes, as well as any other cyclical or 8 | self-referential structures. Note that trying to deep copy an object containing 9 | cyclical references that is neither a window nor a scope will cause infinite 10 | recursion and a stack overflow. 11 | -------------------------------------------------------------------------------- /docs/content/error/ng/test.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ng:test 3 | @fullName Testability Not Found 4 | @description 5 | 6 | Angular's testability helper, getTestability, requires a root element to be 7 | passed in. This helps differentiate between different Angular apps on the same 8 | page. This error is thrown when no injector is found for root element. It is 9 | often because the root element is outside of the ng-app. 10 | -------------------------------------------------------------------------------- /docs/content/error/ngModel/constexpr.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ngModel:constexpr 3 | @fullName Non-Constant Expression 4 | @description 5 | 6 | Some attributes used in conjunction with ngModel (such as ngTrueValue or ngFalseValue) will only 7 | accept constant expressions. 8 | 9 | Examples using constant expressions include: 10 | 11 | ``` 12 | 13 | 14 | ``` 15 | 16 | Examples of non-constant expressions include: 17 | 18 | ``` 19 | 20 | 21 | ``` 22 | -------------------------------------------------------------------------------- /docs/content/error/ngModel/datefmt.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ngModel:datefmt 3 | @fullName Model is not a date object 4 | @description 5 | 6 | All date-related inputs like `` require the model to be a `Date` object. 7 | If the model is something else, this error will be thrown. 8 | Angular does not set validation errors on the `` in this case 9 | as those errors are shown to the user, but the erroneous state was 10 | caused by incorrect application logic and not by the user. 11 | 12 | -------------------------------------------------------------------------------- /docs/content/error/ngModel/nonassign.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ngModel:nonassign 3 | @fullName Non-Assignable Expression 4 | @description 5 | 6 | This error occurs when expression the {@link ng.directive:ngModel ngModel} directive is bound to is a non-assignable expression. 7 | 8 | Examples using assignable expressions include: 9 | 10 | ``` 11 | 12 | 13 | 14 | ``` 15 | 16 | Examples of non-assignable expressions include: 17 | 18 | ``` 19 | 20 | 21 | 22 | 23 | ``` 24 | 25 | Always make sure that the expression bound via `ngModel` directive can be assigned to. 26 | 27 | For more information, see the {@link ng.directive:ngModel ngModel API doc}. 28 | -------------------------------------------------------------------------------- /docs/content/error/ngOptions/iexp.ngdoc: -------------------------------------------------------------------------------- 1 | @ngdoc error 2 | @name ngOptions:iexp 3 | @fullName Invalid Expression 4 | @description 5 | This error occurs when 'ngOptions' is passed an expression that isn't in an expected form. 6 | 7 | Here's an example of correct syntax: 8 | 9 | ``` 10 |
16 | date: {{input | date:"medium"}}
17 | date: {{input | date:"longDate"}}
18 | number: {{input | number}}
19 | currency: {{input | currency }} 20 | 21 | 22 | -------------------------------------------------------------------------------- /i18n/e2e/localeTest_de.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | locale test 6 | 7 | 8 | 13 | 14 | 15 |
16 | date: {{input | date:"medium"}}
17 | date: {{input | date:"longDate"}}
18 | number: {{input | number}}
19 | currency: {{input | currency }} 20 | 21 | 22 | -------------------------------------------------------------------------------- /i18n/e2e/localeTest_es.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | locale test 6 | 7 | 8 | 13 | 14 | 15 |
16 | date: {{input | date:"medium"}}
17 | date: {{input | date:"longDate"}}
18 | number: {{input | number}}
19 | currency: {{input | currency }} 20 | 21 | 22 | -------------------------------------------------------------------------------- /i18n/e2e/localeTest_sk.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | locale test 6 | 7 | 8 | 14 | 15 | 16 |
17 | date: {{input | date:"medium"}}
18 | date: {{input | date:"longDate"}}
19 | number: {{input | number}}
20 | currency: {{input | currency }} 21 |
22 |
23 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /i18n/e2e/localeTest_zh.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | locale test 6 | 7 | 8 | 17 | 18 | 19 |

Datetime/Number/Currency filters demo:

20 |
21 | date(medium): {{input | date:"medium"}}
22 | date(longDate): {{input | date:"longDate"}}
23 | number: {{input | number}}
24 | currency: {{input | currency }} 25 |
26 |

Pluralization demo:

27 |
28 | 30 | 31 |
32 |

Pluralization demo with offsets:

33 | Name of person1:
34 | Name of person2:
35 |
36 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /i18n/e2e/runner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <angular/> Docs Scenario Runner 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /i18n/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | BASE_DIR=`dirname $0` 6 | cd $BASE_DIR 7 | 8 | ./run-tests.sh 9 | 10 | node src/closureSlurper.js 11 | 12 | 13 | -------------------------------------------------------------------------------- /i18n/run-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | PARENT_DIR="$(dirname "$0")" 5 | 6 | ../node_modules/.bin/jasmine-node "$PARENT_DIR"/spec/ 7 | -------------------------------------------------------------------------------- /i18n/spec/utilSpec.js: -------------------------------------------------------------------------------- 1 | var util = require('../src/util.js'); 2 | 3 | describe('findLocaleId', function() { 4 | it('should find localeId', function() { 5 | expect(util.findLocaleId('', 'num')).toBeUndefined(); 6 | expect(util.findLocaleId('aa', 'datetime')).toBeUndefined(); 7 | expect(util.findLocaleId('aa', 'randomType')).toBeUndefined(); 8 | expect(util.findLocaleId('NumberFormatSymbols_en', 'datetime')).toBeUndefined(); 9 | expect(util.findLocaleId('DateTimeSymbols_en', 'num')).toBeUndefined(); 10 | 11 | expect(util.findLocaleId('DateTimeSymbols_en', 'datetime')).toBe('en'); 12 | expect(util.findLocaleId('NumberFormatSymbols_en_US', 'num')).toBe('en_US'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /i18n/src/util.js: -------------------------------------------------------------------------------- 1 | exports.findLocaleId = function findLocaleId(str, type) { 2 | if (type === 'num') { 3 | return (str.match(/^NumberFormatSymbols_(.+)$/) || [])[1]; 4 | } else if (type == 'datetime') { 5 | return (str.match(/^DateTimeSymbols_(.+)$/) || [])[1]; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /i18n/update-closure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e # Exit on error. 4 | 5 | BASE_DIR=`dirname $0` 6 | cd $BASE_DIR 7 | 8 | set -x # Trace commands as they're executed. 9 | 10 | I18N_BASE="https://raw.githubusercontent.com/google/closure-library/master/closure/goog/i18n" 11 | 12 | # use the github repo as it is more up to date than the svn repo 13 | curl "$I18N_BASE/currency.js" > closure/currencySymbols.js 14 | curl "$I18N_BASE/datetimesymbols.js" > closure/datetimeSymbols.js 15 | curl "$I18N_BASE/datetimesymbolsext.js" > closure/datetimeSymbolsExt.js 16 | curl "$I18N_BASE/numberformatsymbols.js" > closure/numberSymbols.js 17 | curl "$I18N_BASE/numberformatsymbolsext.js" > closure/numberSymbolsExt.js 18 | curl "$I18N_BASE/pluralrules.js" > closure/pluralRules.js 19 | -------------------------------------------------------------------------------- /images/css/arrow_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/css/arrow_left.gif -------------------------------------------------------------------------------- /images/css/arrow_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/css/arrow_right.gif -------------------------------------------------------------------------------- /images/css/indicator-wait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/css/indicator-wait.png -------------------------------------------------------------------------------- /images/docs/Diagrams.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/Diagrams.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/Diagrams.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/Diagrams.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/Diagrams.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/Diagrams.graffle/image1.png -------------------------------------------------------------------------------- /images/docs/Diagrams.graffle/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/Diagrams.graffle/image2.png -------------------------------------------------------------------------------- /images/docs/Diagrams.graffle/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/Diagrams.graffle/image4.png -------------------------------------------------------------------------------- /images/docs/Diagrams.graffle/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/Diagrams.graffle/image8.png -------------------------------------------------------------------------------- /images/docs/Diagrams.graffle/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/Diagrams.graffle/image9.png -------------------------------------------------------------------------------- /images/docs/guide/concepts.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/guide/concepts.graffle/image1.png -------------------------------------------------------------------------------- /images/docs/guide/concepts.graffle/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/guide/concepts.graffle/image4.png -------------------------------------------------------------------------------- /images/docs/guide/concepts.graffle/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/guide/concepts.graffle/image5.png -------------------------------------------------------------------------------- /images/docs/guide/simple_scope.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/guide/simple_scope.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/guide/simple_scope.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/guide/simple_scope.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/guide/simple_scope.graffle/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/guide/simple_scope.graffle/image7.png -------------------------------------------------------------------------------- /images/docs/tutorial/simple_scope.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/simple_scope.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/tutorial/simple_scope.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/simple_scope.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/tutorial/simple_scope.graffle/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/simple_scope.graffle/image7.png -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_02.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_02.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_02.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_02.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_02.graffle/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_02.graffle/image11.png -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_03.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_03.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_03.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_03.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_03.graffle/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_03.graffle/image13.png -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_04.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_04.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_04.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_04.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_04.graffle/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_04.graffle/image15.png -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_07.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_07.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_07.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_07.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_07.graffle/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_07.graffle/image9.png -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_08-09.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_08-09.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_08-09.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_08-09.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_08-09.graffle/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_08-09.graffle/image10.png -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_10-11.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_10-11.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_10-11.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_10-11.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_10-11.graffle/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_10-11.graffle/image10.png -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_proto.graffle/QuickLook/Preview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_proto.graffle/QuickLook/Preview.pdf -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_proto.graffle/QuickLook/Thumbnail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_proto.graffle/QuickLook/Thumbnail.tiff -------------------------------------------------------------------------------- /images/docs/tutorial/tutorial_proto.graffle/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/docs/tutorial/tutorial_proto.graffle/image7.png -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/favicon.ico -------------------------------------------------------------------------------- /images/logo/AngularJS-Shield.exports/AngularJS-Shield-huge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS-Shield.exports/AngularJS-Shield-huge.png -------------------------------------------------------------------------------- /images/logo/AngularJS-Shield.exports/AngularJS-Shield-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS-Shield.exports/AngularJS-Shield-large.png -------------------------------------------------------------------------------- /images/logo/AngularJS-Shield.exports/AngularJS-Shield-medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS-Shield.exports/AngularJS-Shield-medium.png -------------------------------------------------------------------------------- /images/logo/AngularJS-Shield.exports/AngularJS-Shield-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS-Shield.exports/AngularJS-Shield-small.png -------------------------------------------------------------------------------- /images/logo/AngularJS-Shield.exports/AngularJS-Shield.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS-Shield.exports/AngularJS-Shield.pdf -------------------------------------------------------------------------------- /images/logo/AngularJS.exports/AngularJS-huge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.exports/AngularJS-huge.png -------------------------------------------------------------------------------- /images/logo/AngularJS.exports/AngularJS-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.exports/AngularJS-large.png -------------------------------------------------------------------------------- /images/logo/AngularJS.exports/AngularJS-medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.exports/AngularJS-medium.png -------------------------------------------------------------------------------- /images/logo/AngularJS.exports/AngularJS-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.exports/AngularJS-small.png -------------------------------------------------------------------------------- /images/logo/AngularJS.exports/AngularJS.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.exports/AngularJS.eps -------------------------------------------------------------------------------- /images/logo/AngularJS.exports/AngularJS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.exports/AngularJS.pdf -------------------------------------------------------------------------------- /images/logo/AngularJS.graffle/data.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.graffle/data.plist -------------------------------------------------------------------------------- /images/logo/AngularJS.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.graffle/image1.png -------------------------------------------------------------------------------- /images/logo/AngularJS.graffle/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PatrickJS/angular.js/bfd7b227dbf826dcda351916881821ebceddc797/images/logo/AngularJS.graffle/image2.png -------------------------------------------------------------------------------- /init-repo.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Script to initialize angular repo 4 | # - install required node packages 5 | # - install Karma 6 | # - install git hooks 7 | 8 | 9 | node=`which node 2>&1` 10 | if [ $? -ne 0 ]; then 11 | echo "Please install NodeJS." 12 | echo "http://nodejs.org/" 13 | exit 1 14 | fi 15 | 16 | npm=`which npm 2>&1` 17 | if [ $? -ne 0 ]; then 18 | echo "Please install NPM." 19 | fi 20 | 21 | 22 | echo "Installing required npm packages..." 23 | npm install 24 | 25 | karma=`which karma 2>&1` 26 | if [ $? -ne 0 ]; then 27 | echo "Installing Karma..." 28 | npm install -g karma 29 | fi 30 | 31 | echo "Installing git hooks..." 32 | ln -sf ../../validate-commit-msg.js .git/hooks/commit-msg 33 | -------------------------------------------------------------------------------- /jenkins_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "#################################" 4 | echo "#### Jenkins Build ############" 5 | echo "#################################" 6 | 7 | # Enable tracing and exit on first failure 8 | set -xe 9 | 10 | # This is the default set of browsers to use on the CI server unless overridden via env variable 11 | if [[ -z "$BROWSERS" ]] 12 | then 13 | BROWSERS="Chrome,Firefox,Opera,/Users/jenkins/bin/safari.sh" 14 | fi 15 | 16 | # CLEAN # 17 | rm -f angular.min.js.gzip.size 18 | rm -f angular.js.size 19 | 20 | 21 | # BUILD # 22 | npm install --color false 23 | grunt ci-checks package --no-color 24 | 25 | mkdir -p test_out 26 | 27 | # UNIT TESTS # 28 | grunt test:unit --browsers $BROWSERS --reporters=dots,junit --no-colors --no-color 29 | 30 | # END TO END TESTS # 31 | grunt test:ci-protractor 32 | 33 | # DOCS APP TESTS # 34 | grunt test:docs --browsers $BROWSERS --reporters=dots,junit --no-colors --no-color 35 | 36 | # Promises/A+ TESTS # 37 | grunt test:promises-aplus --no-color 38 | 39 | 40 | # CHECK SIZE # 41 | gzip -c < build/angular.min.js > build/angular.min.js.gzip 42 | echo "YVALUE=`ls -l build/angular.min.js | cut -d" " -f 8`" > angular.min.js.size 43 | echo "YVALUE=`ls -l build/angular.min.js.gzip | cut -d" " -f 8`" > angular.min.js.gzip.size 44 | -------------------------------------------------------------------------------- /karma-docs.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var sharedConfig = require('./karma-shared.conf'); 4 | 5 | module.exports = function(config) { 6 | sharedConfig(config, {testName: 'AngularJS: docs', logFile: 'karma-docs.log'}); 7 | 8 | config.set({ 9 | files: [ 10 | 'build/angular.js', 11 | 'build/angular-mocks.js', 12 | 'docs/app/src/**/*.js', 13 | 'docs/app/test/**/*Spec.js' 14 | ], 15 | 16 | junitReporter: { 17 | outputFile: 'test_out/docs.xml', 18 | suite: 'Docs' 19 | } 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /karma-jqlite.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var angularFiles = require('./angularFiles'); 4 | var sharedConfig = require('./karma-shared.conf'); 5 | 6 | module.exports = function(config) { 7 | sharedConfig(config, {testName: 'AngularJS: jqLite', logFile: 'karma-jqlite.log'}); 8 | 9 | config.set({ 10 | files: angularFiles.mergeFilesFor('karma'), 11 | exclude: angularFiles.mergeFilesFor('karmaExclude'), 12 | 13 | junitReporter: { 14 | outputFile: 'test_out/jqlite.xml', 15 | suite: 'jqLite' 16 | } 17 | }); 18 | }; 19 | -------------------------------------------------------------------------------- /karma-jquery.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var angularFiles = require('./angularFiles'); 4 | var sharedConfig = require('./karma-shared.conf'); 5 | 6 | module.exports = function(config) { 7 | sharedConfig(config, {testName: 'AngularJS: jQuery', logFile: 'karma-jquery.log'}); 8 | 9 | config.set({ 10 | files: angularFiles.mergeFilesFor('karmaJquery'), 11 | exclude: angularFiles.mergeFilesFor('karmaJqueryExclude'), 12 | 13 | junitReporter: { 14 | outputFile: 'test_out/jquery.xml', 15 | suite: 'jQuery' 16 | } 17 | }); 18 | }; 19 | -------------------------------------------------------------------------------- /karma-modules.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var angularFiles = require('./angularFiles'); 4 | var sharedConfig = require('./karma-shared.conf'); 5 | 6 | module.exports = function(config) { 7 | sharedConfig(config, {testName: 'AngularJS: modules', logFile: 'karma-modules.log'}); 8 | 9 | config.set({ 10 | files: angularFiles.mergeFilesFor('karmaModules', 'angularSrcModules'), 11 | 12 | junitReporter: { 13 | outputFile: 'test_out/modules.xml', 14 | suite: 'modules' 15 | } 16 | }); 17 | }; 18 | -------------------------------------------------------------------------------- /lib/browserstack/start_tunnel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var fs = require('fs'); 4 | var http = require('http'); 5 | var BrowserStackTunnel = require('browserstacktunnel-wrapper'); 6 | 7 | var HOSTNAME = 'localhost'; 8 | var PORTS = [9876, 8000]; 9 | var ACCESS_KEY = process.env.BROWSER_STACK_ACCESS_KEY; 10 | var READY_FILE = process.env.BROWSER_PROVIDER_READY_FILE; 11 | var TUNNEL_IDENTIFIER = process.env.TRAVIS_JOB_NUMBER; 12 | 13 | // We need to start fake servers, otherwise the tunnel does not start. 14 | var fakeServers = []; 15 | var hosts = []; 16 | 17 | PORTS.forEach(function(port) { 18 | fakeServers.push(http.createServer(function() {}).listen(port)); 19 | hosts.push({ 20 | name: HOSTNAME, 21 | port: port, 22 | sslFlag: 0 23 | }); 24 | }); 25 | 26 | var tunnel = new BrowserStackTunnel({ 27 | key: ACCESS_KEY, 28 | tunnelIdentifier: TUNNEL_IDENTIFIER, 29 | hosts: hosts 30 | }); 31 | 32 | console.log('Starting tunnel on ports', PORTS.join(', ')); 33 | tunnel.start(function(error) { 34 | if (error) { 35 | console.error('Can not establish the tunnel', error); 36 | } else { 37 | console.log('Tunnel established.'); 38 | fakeServers.forEach(function(server) { 39 | server.close(); 40 | }); 41 | 42 | if (READY_FILE) { 43 | fs.writeFile(READY_FILE, ''); 44 | } 45 | } 46 | }); 47 | 48 | tunnel.on('error', function(error) { 49 | console.error(error); 50 | }); 51 | -------------------------------------------------------------------------------- /lib/browserstack/start_tunnel.sh: -------------------------------------------------------------------------------- 1 | export BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev` 2 | 3 | node ./lib/browserstack/start_tunnel.js & 4 | -------------------------------------------------------------------------------- /lib/promises-aplus/promises-aplus-test-adapter.js: -------------------------------------------------------------------------------- 1 | /* global qFactory: false */ 2 | 'use strict'; 3 | 4 | var isFunction = function isFunction(value){return typeof value == 'function';}; 5 | var isPromiseLike = function isPromiseLike(obj) {return obj && isFunction(obj.then);}; 6 | var isObject = function isObject(value){return value != null && typeof value === 'object';}; 7 | var minErr = function minErr (module, constructor) { 8 | return function (){ 9 | var ErrorConstructor = constructor || Error; 10 | throw new ErrorConstructor(module + arguments[0] + arguments[1]); 11 | }; 12 | }; 13 | 14 | var $q = qFactory(process.nextTick, function noopExceptionHandler() {}); 15 | 16 | exports.resolved = $q.resolve; 17 | exports.rejected = $q.reject; 18 | exports.deferred = function () { 19 | var deferred = $q.defer(); 20 | 21 | return { 22 | promise: deferred.promise, 23 | resolve: deferred.resolve, 24 | reject: deferred.reject 25 | }; 26 | }; 27 | -------------------------------------------------------------------------------- /logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /protractor-conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var config = require('./protractor-shared-conf').config; 4 | 5 | config.specs = [ 6 | 'test/e2e/tests/**/*.js', 7 | 'build/docs/ptore2e/**/*.js', 8 | 'docs/app/e2e/**/*.scenario.js' 9 | ]; 10 | 11 | config.capabilities = { 12 | browserName: 'chrome', 13 | }; 14 | 15 | exports.config = config; 16 | -------------------------------------------------------------------------------- /protractor-jenkins-conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.config = { 4 | allScriptsTimeout: 11000, 5 | 6 | specs: [ 7 | 'test/e2e/tests/**/*.js', 8 | 'build/docs/ptore2e/**/*.js', 9 | 'docs/app/e2e/*.scenario.js' 10 | ], 11 | 12 | capabilities: { 13 | 'browserName': 'chrome' 14 | }, 15 | 16 | baseUrl: 'http://localhost:8000/', 17 | 18 | framework: 'jasmine', 19 | 20 | onPrepare: function() { 21 | /* global angular: false, browser: false, jasmine: false */ 22 | 23 | // Disable animations so e2e tests run more quickly 24 | var disableNgAnimate = function() { 25 | angular.module('disableNgAnimate', []).run(['$animate', function($animate) { 26 | $animate.enabled(false); 27 | }]); 28 | }; 29 | 30 | browser.addMockModule('disableNgAnimate', disableNgAnimate); 31 | 32 | require('jasmine-reporters'); 33 | jasmine.getEnv().addReporter( 34 | new jasmine.JUnitXmlReporter('test_out/docs-e2e-' + exports.config.capabilities.browserName + '-', true, true)); 35 | }, 36 | 37 | jasmineNodeOpts: { 38 | defaultTimeoutInterval: 30000, 39 | showColors: false 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /protractor-shared-conf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.config = { 4 | allScriptsTimeout: 11000, 5 | 6 | baseUrl: 'http://localhost:8000/', 7 | 8 | framework: 'jasmine', 9 | 10 | onPrepare: function() { 11 | /* global angular: false, browser: false, jasmine: false */ 12 | 13 | // Disable animations so e2e tests run more quickly 14 | var disableNgAnimate = function() { 15 | angular.module('disableNgAnimate', []).run(['$animate', function($animate) { 16 | $animate.enabled(false); 17 | }]); 18 | }; 19 | 20 | browser.addMockModule('disableNgAnimate', disableNgAnimate); 21 | 22 | // Store the name of the browser that's currently being used. 23 | browser.getCapabilities().then(function(caps) { 24 | browser.params.browser = caps.get('browserName'); 25 | }); 26 | }, 27 | 28 | jasmineNodeOpts: { 29 | defaultTimeoutInterval: 60000, 30 | showTiming: true 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /scripts/angular.js/tag-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Tags a release 4 | # so that travis can do the actual release. 5 | 6 | echo "#################################" 7 | echo "## Tag angular.js for a release #" 8 | echo "#################################" 9 | 10 | ARG_DEFS=( 11 | "--action=(prepare|publish)" 12 | "--commit-sha=(.*)" 13 | # the version number of the release. 14 | # e.g. 1.2.12 or 1.2.12-rc.1 15 | "--version-number=([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)" 16 | "--version-name=(.+)" 17 | ) 18 | 19 | function checkVersionNumber() { 20 | BRANCH_PATTERN=$(readJsonProp "package.json" "branchPattern") 21 | if [[ $VERSION_NUMBER != $BRANCH_PATTERN ]]; then 22 | echo "version-number needs to match $BRANCH_PATTERN on this branch" 23 | usage 24 | fi 25 | } 26 | 27 | function init { 28 | cd ../.. 29 | checkVersionNumber 30 | TAG_NAME="v$VERSION_NUMBER" 31 | } 32 | 33 | function prepare() { 34 | git tag "$TAG_NAME" -m "chore(release): $TAG_NAME codename($VERSION_NAME)" "$COMMIT_SHA" 35 | } 36 | 37 | function publish() { 38 | # push the tag to github 39 | git push origin $TAG_NAME 40 | } 41 | 42 | source $(dirname $0)/../utils.inc 43 | -------------------------------------------------------------------------------- /scripts/angular.js/untag-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Untags a release. 4 | 5 | echo "###################################" 6 | echo "## Untag angular.js for a release #" 7 | echo "###################################" 8 | 9 | ARG_DEFS=( 10 | "--action=(prepare|publish)" 11 | # the version number of the release. 12 | # e.g. 1.2.12 or 1.2.12-rc.1 13 | "--version-number=([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)" 14 | ) 15 | 16 | function init { 17 | TMP_DIR=$(resolveDir ../../tmp) 18 | TAG_NAME="v$VERSION_NUMBER" 19 | } 20 | 21 | function prepare() { 22 | : 23 | } 24 | 25 | function publish() { 26 | # push the tag deletion to github 27 | tags=`git ls-remote --tags git@github.com:angular/angular.js` 28 | if [[ $tags =~ "refs/tags/v$VERSION_NUMBER^" ]]; then 29 | echo "-- Creating dummy git repo for angular.js with origin remote" 30 | mkdir $TMP_DIR/empty-angular.js 31 | cd $TMP_DIR/empty-angular.js 32 | git init 33 | git remote add origin git@github.com:angular/angular.js.git 34 | git push origin ":$TAG_NAME" 35 | else 36 | echo "-- Tag v$VERSION_NUMBER does not exist on remote. Moving on" 37 | fi 38 | } 39 | 40 | source $(dirname $0)/../utils.inc 41 | -------------------------------------------------------------------------------- /scripts/bower/unpublish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Script for removing tags from the Angular bower repos 4 | 5 | echo "#################################" 6 | echo "#### Untag bower ################" 7 | echo "#################################" 8 | 9 | ARG_DEFS=( 10 | "--action=(prepare|publish)" 11 | "--version-number=([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)" 12 | ) 13 | 14 | function init { 15 | TMP_DIR=$(resolveDir ../../tmp) 16 | REPOS=( 17 | angular 18 | angular-animate 19 | angular-aria 20 | angular-cookies 21 | angular-i18n 22 | angular-loader 23 | angular-messages 24 | angular-mocks 25 | angular-route 26 | angular-resource 27 | angular-sanitize 28 | angular-scenario 29 | angular-touch 30 | ) 31 | } 32 | 33 | function prepare { 34 | : 35 | } 36 | 37 | function publish { 38 | for repo in "${REPOS[@]}" 39 | do 40 | tags=`git ls-remote --tags git@github.com:angular/bower-$repo` 41 | if [[ $tags =~ "refs/tags/v$VERSION_NUMBER" ]]; then 42 | echo "-- Creating dummy git repo for bower-$repo with origin remote" 43 | mkdir $TMP_DIR/bower-$repo 44 | cd $TMP_DIR/bower-$repo 45 | git init 46 | git remote add origin git@github.com:angular/bower-$repo.git 47 | git push origin :v$VERSION_NUMBER 48 | echo "-- Deleting v$VERSION_NUMBER tag from bower-$repo" 49 | cd $SCRIPT_DIR 50 | else 51 | echo "-- No remote tag matching v$VERSION_NUMBER exists on bower-$repo" 52 | fi 53 | done 54 | } 55 | 56 | source $(dirname $0)/../utils.inc 57 | -------------------------------------------------------------------------------- /scripts/code.angularjs.org/unpublish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Script for removing specified release dir from code.angularjs.org. 4 | 5 | echo "################################################" 6 | echo "## Remove a version from code.angular.js.org ###" 7 | echo "################################################" 8 | 9 | ARG_DEFS=( 10 | "--action=(prepare|publish)" 11 | "--version-number=([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)" 12 | ) 13 | 14 | function init { 15 | TMP_DIR=$(resolveDir ../../tmp) 16 | REPO_DIR=$TMP_DIR/code.angularjs.org 17 | echo "code tmp $TMP_DIR" 18 | } 19 | 20 | function prepare { 21 | echo "-- Cloning code.angularjs.org" 22 | git clone git@github.com:angular/code.angularjs.org.git $REPO_DIR 23 | 24 | # 25 | # Remove the files from the repo 26 | # 27 | echo "-- Removing $VERSION_NUMBER from code.angularjs.org" 28 | cd $REPO_DIR 29 | if [ -d "$VERSION_NUMBER" ]; then 30 | git rm -r $VERSION_NUMBER 31 | echo "-- Committing removal to code.angularjs.org" 32 | git commit -m "removing v$VERSION_NUMBER" 33 | else 34 | echo "-- Version: $VERSION_NUMBER does not exist in code.angularjs.org!" 35 | fi 36 | } 37 | 38 | function publish { 39 | cd $REPO_DIR 40 | 41 | echo "-- Pushing code.angularjs.org to github" 42 | git push origin master 43 | } 44 | 45 | source $(dirname $0)/../utils.inc 46 | -------------------------------------------------------------------------------- /scripts/jenkins/master.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "#################################" 4 | echo "#### Update master ##############" 5 | echo "#################################" 6 | 7 | ARG_DEFS=( 8 | "[--no-test=(true|false)]" 9 | ) 10 | 11 | function init { 12 | if [[ ! $VERBOSE ]]; then 13 | VERBOSE=false 14 | fi 15 | VERBOSE_ARG="--verbose=$VERBOSE" 16 | } 17 | 18 | function build { 19 | cd ../.. 20 | 21 | if [[ $NO_TEST == "true" ]]; then 22 | npm install --color false 23 | grunt ci-checks package --no-color 24 | else 25 | ./jenkins_build.sh 26 | fi 27 | 28 | cd $SCRIPT_DIR 29 | } 30 | 31 | function phase { 32 | ACTION_ARG="--action=$1" 33 | ../code.angularjs.org/publish.sh $ACTION_ARG $VERBOSE_ARG 34 | ../bower/publish.sh $ACTION_ARG $VERBOSE_ARG 35 | } 36 | 37 | function run { 38 | build 39 | 40 | # First prepare all scripts (build, test, commit, tag, ...), 41 | # so we are sure everything is all right 42 | phase prepare 43 | # only then publish to github 44 | phase publish 45 | } 46 | 47 | source $(dirname $0)/../utils.inc 48 | -------------------------------------------------------------------------------- /scripts/jenkins/undo-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "#################################" 4 | echo "#### undo a release ############" 5 | echo "#################################" 6 | 7 | ARG_DEFS=( 8 | # require the git dryrun flag so the script can't be run without 9 | # thinking about this! 10 | "--git-push-dryrun=(true|false)" 11 | # the version number of the release. 12 | # e.g. 1.2.12 or 1.2.12-rc.1 13 | "--version-number=([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)" 14 | ) 15 | 16 | function init { 17 | if [[ ! $VERBOSE ]]; then 18 | VERBOSE=false 19 | fi 20 | VERBOSE_ARG="--verbose=$VERBOSE" 21 | } 22 | 23 | function phase { 24 | ACTION_ARG="--action=$1" 25 | VERSION_NUMBER_ARG="--version-number=$VERSION_NUMBER" 26 | ../angular.js/untag-release.sh $ACTION_ARG $VERBOSE_ARG\ 27 | --version-number=$VERSION_NUMBER 28 | 29 | ../code.angularjs.org/unpublish.sh $ACTION_ARG $VERSION_NUMBER_ARG $VERBOSE_ARG 30 | ../bower/unpublish.sh $ACTION_ARG $VERSION_NUMBER_ARG $VERBOSE_ARG 31 | } 32 | 33 | function run { 34 | # First prepare all scripts (build, commit, tag, ...), 35 | # so we are sure everything is all right 36 | phase prepare 37 | # only then publish to github 38 | phase publish 39 | } 40 | 41 | source $(dirname $0)/../utils.inc 42 | -------------------------------------------------------------------------------- /scripts/npm/clean-shrinkwrap.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * this script is just a temporary solution to deal with the issue of npm outputting the npm 5 | * shrinkwrap file in an unstable manner. 6 | * 7 | * See: https://github.com/npm/npm/issues/3581 8 | */ 9 | 10 | var _ = require('lodash'); 11 | var sorted = require('sorted-object'); 12 | var fs = require('fs'); 13 | var path = require('path'); 14 | 15 | 16 | function cleanModule(module, name) { 17 | 18 | // keep `resolve` properties for git dependencies, delete otherwise 19 | delete module.from; 20 | if (!(module.resolved && module.resolved.match(/^git(\+[a-z]+)?:\/\//))) { 21 | delete module.resolved; 22 | } 23 | 24 | _.forEach(module.dependencies, function(mod, name) { 25 | cleanModule(mod, name); 26 | }); 27 | } 28 | 29 | 30 | console.log('Reading npm-shrinkwrap.json'); 31 | var shrinkwrap = require('../../npm-shrinkwrap.json'); 32 | 33 | console.log('Cleaning shrinkwrap object'); 34 | cleanModule(shrinkwrap, shrinkwrap.name); 35 | 36 | var cleanShrinkwrapPath = path.join(__dirname, '..', '..', 'npm-shrinkwrap.clean.json'); 37 | console.log('Writing cleaned to', cleanShrinkwrapPath); 38 | fs.writeFileSync(cleanShrinkwrapPath, JSON.stringify(sorted(shrinkwrap), null, 2) + "\n"); 39 | -------------------------------------------------------------------------------- /scripts/npm/install-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | SHRINKWRAP_FILE=npm-shrinkwrap.json 6 | SHRINKWRAP_CACHED_FILE=node_modules/npm-shrinkwrap.cached.json 7 | 8 | if diff -q $SHRINKWRAP_FILE $SHRINKWRAP_CACHED_FILE; then 9 | echo 'No shrinkwrap changes detected. npm install will be skipped...'; 10 | else 11 | echo 'Blowing away node_modules and reinstalling npm dependencies...' 12 | rm -rf node_modules 13 | npm install 14 | cp $SHRINKWRAP_FILE $SHRINKWRAP_CACHED_FILE 15 | echo 'npm install successful!' 16 | fi 17 | -------------------------------------------------------------------------------- /scripts/travis/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | export BROWSER_STACK_ACCESS_KEY=`echo $BROWSER_STACK_ACCESS_KEY | rev` 6 | export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev` 7 | 8 | if [ $JOB = "unit" ]; then 9 | if [ "$BROWSER_PROVIDER" == "browserstack" ]; then 10 | BROWSERS="BS_Chrome,BS_Safari,BS_Firefox,BS_IE_9,BS_IE_10,BS_IE_11" 11 | else 12 | BROWSERS="SL_Chrome,SL_Safari,SL_Firefox,SL_IE_9,SL_IE_10,SL_IE_11" 13 | fi 14 | 15 | grunt test:promises-aplus 16 | grunt test:unit --browsers $BROWSERS --reporters dots 17 | grunt ci-checks 18 | grunt tests:docs --browsers $BROWSERS --reporters dots 19 | elif [ $JOB = "docs-e2e" ]; then 20 | grunt test:travis-protractor --specs "docs/app/e2e/**/*.scenario.js" 21 | elif [ $JOB = "e2e" ]; then 22 | if [ $TEST_TARGET = "jquery" ]; then 23 | export USE_JQUERY=1 24 | fi 25 | 26 | export TARGET_SPECS="build/docs/ptore2e/**/default_test.js" 27 | if [ $TEST_TARGET = "jquery" ]; then 28 | TARGET_SPECS="build/docs/ptore2e/**/jquery_test.js" 29 | fi 30 | 31 | export TARGET_SPECS="test/e2e/tests/**/*.js,$TARGET_SPECS" 32 | grunt test:travis-protractor --specs "$TARGET_SPECS" 33 | else 34 | echo "Unknown job type. Please set JOB=unit or JOB=e2e-*." 35 | fi 36 | -------------------------------------------------------------------------------- /scripts/travis/npm-bundle-deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # normalize the working dir to the directory of the script 6 | cd $(dirname $0); 7 | 8 | cd ../.. 9 | curl "http://23.251.148.50:8000/tar/$TRAVIS_REPO_SLUG/$TRAVIS_COMMIT" | tar xz || true 10 | -------------------------------------------------------------------------------- /scripts/travis/print_logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOG_FILES=$LOGS_DIR/* 4 | 5 | for FILE in $LOG_FILES; do 6 | echo -e "\n\n\n" 7 | echo "================================================================================" 8 | echo " $FILE" 9 | echo "================================================================================" 10 | cat $FILE 11 | done 12 | -------------------------------------------------------------------------------- /scripts/travis/start_browser_provider.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Has to be run from project root directory. 3 | 4 | 5 | if [ "$BROWSER_PROVIDER" == "browserstack" ]; then 6 | echo "Using BrowserStack" 7 | elif [ "$BROWSER_PROVIDER" == "saucelabs" ]; then 8 | echo "Using SauceLabs" 9 | else 10 | echo "Invalid BROWSER_PROVIDER. Please set env var BROWSER_PROVIDER to 'saucelabs' or 'browserstack'." 11 | exit 1 12 | fi 13 | 14 | ./lib/${BROWSER_PROVIDER}/start_tunnel.sh 15 | -------------------------------------------------------------------------------- /scripts/travis/wait_for_browser_provider.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # Wait for Connect to be ready before exiting 5 | while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do 6 | sleep .5 7 | done 8 | -------------------------------------------------------------------------------- /src/angular.prefix: -------------------------------------------------------------------------------- 1 | /** 2 | * @license AngularJS v"NG_VERSION_FULL" 3 | * (c) 2010-2015 Google, Inc. http://angularjs.org 4 | * License: MIT 5 | */ 6 | (function(window, document, undefined) { 7 | -------------------------------------------------------------------------------- /src/angular.suffix: -------------------------------------------------------------------------------- 1 | if (window.angular.bootstrap) { 2 | //AngularJS is already loaded, so we can return here... 3 | console.log('WARNING: Tried to load angular more than once.'); 4 | return; 5 | } 6 | 7 | //try to bind to jquery now so that one can write jqLite(document).ready() 8 | //but we will rebind on bootstrap again. 9 | bindJQuery(); 10 | 11 | publishExternalAPI(angular); 12 | 13 | jqLite(document).ready(function() { 14 | angularInit(document, bootstrap); 15 | }); 16 | 17 | })(window, document); 18 | -------------------------------------------------------------------------------- /src/loader.prefix: -------------------------------------------------------------------------------- 1 | /** 2 | * @license AngularJS v"NG_VERSION_FULL" 3 | * (c) 2010-2015 Google, Inc. http://angularjs.org 4 | * License: MIT 5 | */ 6 | 'use strict'; 7 | (function() { 8 | -------------------------------------------------------------------------------- /src/loader.suffix: -------------------------------------------------------------------------------- 1 | setupModuleLoader(window); 2 | })(window); 3 | 4 | /** 5 | * Closure compiler type information 6 | * 7 | * @typedef { { 8 | * requires: !Array., 9 | * invokeQueue: !Array.>, 10 | * 11 | * service: function(string, Function):angular.Module, 12 | * factory: function(string, Function):angular.Module, 13 | * value: function(string, *):angular.Module, 14 | * 15 | * filter: function(string, Function):angular.Module, 16 | * 17 | * init: function(Function):angular.Module 18 | * } } 19 | */ 20 | angular.Module; 21 | 22 | -------------------------------------------------------------------------------- /src/module.prefix: -------------------------------------------------------------------------------- 1 | /** 2 | * @license AngularJS v"NG_VERSION_FULL" 3 | * (c) 2010-2015 Google, Inc. http://angularjs.org 4 | * License: MIT 5 | */ 6 | (function(window, angular, undefined) { 7 | -------------------------------------------------------------------------------- /src/module.suffix: -------------------------------------------------------------------------------- 1 | 2 | })(window, window.angular); 3 | -------------------------------------------------------------------------------- /src/ng/asyncCallback.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function $$AsyncCallbackProvider() { 4 | this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) { 5 | return $$rAF.supported 6 | ? function(fn) { return $$rAF(fn); } 7 | : function(fn) { 8 | return $timeout(fn, 0, false); 9 | }; 10 | }]; 11 | } 12 | -------------------------------------------------------------------------------- /src/ng/directive/a.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc directive 5 | * @name a 6 | * @restrict E 7 | * 8 | * @description 9 | * Modifies the default behavior of the html A tag so that the default action is prevented when 10 | * the href attribute is empty. 11 | * 12 | * This change permits the easy creation of action links with the `ngClick` directive 13 | * without changing the location or causing page reloads, e.g.: 14 | * `Add Item` 15 | */ 16 | var htmlAnchorDirective = valueFn({ 17 | restrict: 'E', 18 | compile: function(element, attr) { 19 | if (!attr.href && !attr.xlinkHref) { 20 | return function(scope, element) { 21 | // If the linked element is not an anchor tag anymore, do nothing 22 | if (element[0].nodeName.toLowerCase() !== 'a') return; 23 | 24 | // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. 25 | var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ? 26 | 'xlink:href' : 'href'; 27 | element.on('click', function(event) { 28 | // if we have no href url, then don't navigate anywhere. 29 | if (!element.attr(href)) { 30 | event.preventDefault(); 31 | } 32 | }); 33 | }; 34 | } 35 | } 36 | }); 37 | -------------------------------------------------------------------------------- /src/ng/directive/directives.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function ngDirective(directive) { 4 | if (isFunction(directive)) { 5 | directive = { 6 | link: directive 7 | }; 8 | } 9 | directive.restrict = directive.restrict || 'AC'; 10 | return valueFn(directive); 11 | } 12 | -------------------------------------------------------------------------------- /src/ng/directive/ngNonBindable.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc directive 5 | * @name ngNonBindable 6 | * @restrict AC 7 | * @priority 1000 8 | * 9 | * @description 10 | * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current 11 | * DOM element. This is useful if the element contains what appears to be Angular directives and 12 | * bindings but which should be ignored by Angular. This could be the case if you have a site that 13 | * displays snippets of code, for instance. 14 | * 15 | * @element ANY 16 | * 17 | * @example 18 | * In this example there are two locations where a simple interpolation binding (`{{}}`) is present, 19 | * but the one wrapped in `ngNonBindable` is left alone. 20 | * 21 | * @example 22 | 23 | 24 |
Normal: {{1 + 2}}
25 |
Ignored: {{1 + 2}}
26 |
27 | 28 | it('should check ng-non-bindable', function() { 29 | expect(element(by.binding('1 + 2')).getText()).toContain('3'); 30 | expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/); 31 | }); 32 | 33 |
34 | */ 35 | var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 }); 36 | -------------------------------------------------------------------------------- /src/ng/directive/style.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var styleDirective = valueFn({ 4 | restrict: 'E', 5 | terminal: false 6 | }); 7 | -------------------------------------------------------------------------------- /src/ng/document.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc service 5 | * @name $document 6 | * @requires $window 7 | * 8 | * @description 9 | * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object. 10 | * 11 | * @example 12 | 13 | 14 |
15 |

$document title:

16 |

window.document title:

17 |
18 |
19 | 20 | angular.module('documentExample', []) 21 | .controller('ExampleController', ['$scope', '$document', function($scope, $document) { 22 | $scope.title = $document[0].title; 23 | $scope.windowTitle = angular.element(window.document)[0].title; 24 | }]); 25 | 26 |
27 | */ 28 | function $DocumentProvider() { 29 | this.$get = ['$window', function(window) { 30 | return jqLite(window.document); 31 | }]; 32 | } 33 | -------------------------------------------------------------------------------- /src/ng/raf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function $$RAFProvider() { //rAF 4 | this.$get = ['$window', '$timeout', function($window, $timeout) { 5 | var requestAnimationFrame = $window.requestAnimationFrame || 6 | $window.webkitRequestAnimationFrame; 7 | 8 | var cancelAnimationFrame = $window.cancelAnimationFrame || 9 | $window.webkitCancelAnimationFrame || 10 | $window.webkitCancelRequestAnimationFrame; 11 | 12 | var rafSupported = !!requestAnimationFrame; 13 | var raf = rafSupported 14 | ? function(fn) { 15 | var id = requestAnimationFrame(fn); 16 | return function() { 17 | cancelAnimationFrame(id); 18 | }; 19 | } 20 | : function(fn) { 21 | var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666 22 | return function() { 23 | $timeout.cancel(timer); 24 | }; 25 | }; 26 | 27 | raf.supported = rafSupported; 28 | 29 | return raf; 30 | }]; 31 | } 32 | -------------------------------------------------------------------------------- /src/ng/rootElement.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc service 5 | * @name $rootElement 6 | * 7 | * @description 8 | * The root element of Angular application. This is either the element where {@link 9 | * ng.directive:ngApp ngApp} was declared or the element passed into 10 | * {@link angular.bootstrap}. The element represents the root element of application. It is also the 11 | * location where the application's {@link auto.$injector $injector} service gets 12 | * published, and can be retrieved using `$rootElement.injector()`. 13 | */ 14 | 15 | 16 | // the implementation is in angular.bootstrap 17 | -------------------------------------------------------------------------------- /src/ngAnimate/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "maxlen": false, /* ngAnimate docs contain wide tables */ 4 | "browser": true, 5 | "globals": { 6 | "angular": false 7 | } 8 | } -------------------------------------------------------------------------------- /src/ngCookies/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "browser": true, 4 | "globals": { 5 | "angular": false 6 | } 7 | } -------------------------------------------------------------------------------- /src/ngLocale/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "bitwise": false, /* locale files use bitwise operators */ 4 | "maxlen": false, /* locale files are generated from a 3rd party library that has long lines */ 5 | "browser": true, 6 | "globals": { 7 | "angular": false 8 | }, 9 | "-W041": false 10 | } -------------------------------------------------------------------------------- /src/ngMock/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "browser": true, 4 | "globals": { 5 | "angular": false, 6 | "expect": false, 7 | "jQuery": false 8 | } 9 | } -------------------------------------------------------------------------------- /src/ngResource/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "browser": true, 4 | "globals": { 5 | "angular": false 6 | } 7 | } -------------------------------------------------------------------------------- /src/ngRoute/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "browser": true, 4 | "globals": { 5 | "angular": false, 6 | "ngRouteModule": false 7 | } 8 | } -------------------------------------------------------------------------------- /src/ngRoute/routeParams.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | ngRouteModule.provider('$routeParams', $RouteParamsProvider); 4 | 5 | 6 | /** 7 | * @ngdoc service 8 | * @name $routeParams 9 | * @requires $route 10 | * 11 | * @description 12 | * The `$routeParams` service allows you to retrieve the current set of route parameters. 13 | * 14 | * Requires the {@link ngRoute `ngRoute`} module to be installed. 15 | * 16 | * The route parameters are a combination of {@link ng.$location `$location`}'s 17 | * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}. 18 | * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched. 19 | * 20 | * In case of parameter name collision, `path` params take precedence over `search` params. 21 | * 22 | * The service guarantees that the identity of the `$routeParams` object will remain unchanged 23 | * (but its properties will likely change) even when a route change occurs. 24 | * 25 | * Note that the `$routeParams` are only updated *after* a route change completes successfully. 26 | * This means that you cannot rely on `$routeParams` being correct in route resolve functions. 27 | * Instead you can use `$route.current.params` to access the new route's parameters. 28 | * 29 | * @example 30 | * ```js 31 | * // Given: 32 | * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby 33 | * // Route: /Chapter/:chapterId/Section/:sectionId 34 | * // 35 | * // Then 36 | * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'} 37 | * ``` 38 | */ 39 | function $RouteParamsProvider() { 40 | this.$get = function() { return {}; }; 41 | } 42 | -------------------------------------------------------------------------------- /src/ngSanitize/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "browser": true, 4 | "globals": { 5 | "angular": false, 6 | "htmlSanitizeWriter": false 7 | } 8 | } -------------------------------------------------------------------------------- /src/ngScenario/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "browser": true, 4 | "globals": { 5 | "angular": false, 6 | "includes": false, 7 | "asyncForEach": false, 8 | "msie": false, 9 | "browserTrigger": false, 10 | "console": false, 11 | "alert": false, 12 | "_jQuery": false, 13 | "angularInit": false, 14 | "formatException": false, 15 | "AnimationEvent": false, 16 | "TransitionEvent": false, 17 | "WebKitAnimationEvent": false, 18 | "WebKitTransitionEvent": false, 19 | "$runner": false, 20 | "callerFile": false 21 | } 22 | } -------------------------------------------------------------------------------- /src/ngScenario/angular.prefix: -------------------------------------------------------------------------------- 1 | /** 2 | * @license AngularJS v"NG_VERSION_FULL" 3 | * (c) 2010-2015 Google, Inc. http://angularjs.org 4 | * License: MIT 5 | */ 6 | (function(window, document){ 7 | var _jQuery = window.jQuery.noConflict(true); 8 | -------------------------------------------------------------------------------- /src/ngScenario/angular.suffix: -------------------------------------------------------------------------------- 1 | bindJQuery(); 2 | publishExternalAPI(angular); 3 | 4 | var $runner = new angular.scenario.Runner(window), 5 | scripts = document.getElementsByTagName('script'), 6 | script = scripts[scripts.length - 1], 7 | config = {}; 8 | 9 | angular.forEach(script.attributes, function(attr) { 10 | var match = attr.name.match(/ng[:\-](.*)/); 11 | if (match) { 12 | config[match[1]] = attr.value || true; 13 | } 14 | }); 15 | 16 | if (config.autotest) { 17 | JQLite(document).ready(function() { 18 | angular.scenario.setUpAndRun(config); 19 | }); 20 | } 21 | })(window, document); 22 | 23 | -------------------------------------------------------------------------------- /src/ngScenario/matchers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Matchers for implementing specs. Follows the Jasmine spec conventions. 5 | */ 6 | 7 | angular.scenario.matcher('toEqual', function(expected) { 8 | return angular.equals(this.actual, expected); 9 | }); 10 | 11 | angular.scenario.matcher('toBe', function(expected) { 12 | return this.actual === expected; 13 | }); 14 | 15 | angular.scenario.matcher('toBeDefined', function() { 16 | return angular.isDefined(this.actual); 17 | }); 18 | 19 | angular.scenario.matcher('toBeTruthy', function() { 20 | return this.actual; 21 | }); 22 | 23 | angular.scenario.matcher('toBeFalsy', function() { 24 | return !this.actual; 25 | }); 26 | 27 | angular.scenario.matcher('toMatch', function(expected) { 28 | return new RegExp(expected).test(this.actual); 29 | }); 30 | 31 | angular.scenario.matcher('toBeNull', function() { 32 | return this.actual === null; 33 | }); 34 | 35 | angular.scenario.matcher('toContain', function(expected) { 36 | return includes(this.actual, expected); 37 | }); 38 | 39 | angular.scenario.matcher('toBeLessThan', function(expected) { 40 | return this.actual < expected; 41 | }); 42 | 43 | angular.scenario.matcher('toBeGreaterThan', function(expected) { 44 | return this.actual > expected; 45 | }); 46 | -------------------------------------------------------------------------------- /src/ngScenario/output/Json.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Generates JSON output into a context. 5 | */ 6 | angular.scenario.output('json', function(context, runner, model) { 7 | model.on('RunnerEnd', function() { 8 | context.text(angular.toJson(model.value)); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /src/ngScenario/output/Object.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Creates a global value $result with the result of the runner. 5 | */ 6 | angular.scenario.output('object', function(context, runner, model) { 7 | runner.$window.$result = model.value; 8 | }); 9 | -------------------------------------------------------------------------------- /src/ngTouch/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.jshintrc-base", 3 | "browser": true, 4 | "globals": { 5 | "angular": false, 6 | "ngTouch": false 7 | } 8 | } -------------------------------------------------------------------------------- /src/ngTouch/touch.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @ngdoc module 5 | * @name ngTouch 6 | * @description 7 | * 8 | * # ngTouch 9 | * 10 | * The `ngTouch` module provides touch events and other helpers for touch-enabled devices. 11 | * The implementation is based on jQuery Mobile touch event handling 12 | * ([jquerymobile.com](http://jquerymobile.com/)). 13 | * 14 | * 15 | * See {@link ngTouch.$swipe `$swipe`} for usage. 16 | * 17 | *
18 | * 19 | */ 20 | 21 | // define ngTouch module 22 | /* global -ngTouch */ 23 | var ngTouch = angular.module('ngTouch', []); 24 | 25 | -------------------------------------------------------------------------------- /src/publishExternalApis.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | publishExternalAPI(angular); 4 | -------------------------------------------------------------------------------- /src/stringify.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* global: toDebugString: true */ 4 | 5 | function serializeObject(obj) { 6 | var seen = []; 7 | 8 | return JSON.stringify(obj, function(key, val) { 9 | val = toJsonReplacer(key, val); 10 | if (isObject(val)) { 11 | 12 | if (seen.indexOf(val) >= 0) return '<>'; 13 | 14 | seen.push(val); 15 | } 16 | return val; 17 | }); 18 | } 19 | 20 | function toDebugString(obj) { 21 | if (typeof obj === 'function') { 22 | return obj.toString().replace(/ \{[\s\S]*$/, ''); 23 | } else if (typeof obj === 'undefined') { 24 | return 'undefined'; 25 | } else if (typeof obj !== 'string') { 26 | return serializeObject(obj); 27 | } 28 | return obj; 29 | } 30 | -------------------------------------------------------------------------------- /test/e2e/fixtures/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "browser": true, 3 | "globals": { 4 | "angular": false, 5 | "jQuery": false, 6 | "$": false 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/e2e/fixtures/sample/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

{{text}}

5 |
6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/e2e/fixtures/sample/script.js: -------------------------------------------------------------------------------- 1 | angular.module("test", []). 2 | controller("TestCtrl", function($scope) { 3 | $scope.text = "Hello, world!"; 4 | }); 5 | -------------------------------------------------------------------------------- /test/e2e/tests/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "globals": { 4 | "describe": false, 5 | "ddescribe": false, 6 | "xdescribe": false, 7 | "it": false, 8 | "xit": false, 9 | "iit": false 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/e2e/tests/helpers/main.js: -------------------------------------------------------------------------------- 1 | var helper = { 2 | andWaitForAngular: function() { 3 | browser.waitForAngular(); 4 | }, 5 | loadFixture: function(fixture) { 6 | var i = 0; 7 | while (fixture[i] === '/') ++i; 8 | fixture = fixture.slice(i); 9 | if (!/\/(index\.html)?$/.test(fixture)) { 10 | fixture += '/'; 11 | } 12 | 13 | if (process.env.USE_JQUERY) { 14 | fixture += '?jquery'; 15 | } 16 | 17 | browser.get('/e2e/fixtures/' + fixture); 18 | return helper; 19 | } 20 | }; 21 | 22 | global.test = helper; 23 | global.loadFixture = helper.loadFixture; 24 | -------------------------------------------------------------------------------- /test/e2e/tests/sampleSpec.js: -------------------------------------------------------------------------------- 1 | // Sample E2E test: 2 | // 3 | describe('Sample', function() { 4 | beforeEach(function() { 5 | loadFixture("sample").andWaitForAngular(); 6 | }); 7 | 8 | it('should have the interpolated text', function() { 9 | expect(element(by.binding('text')).getText()) 10 | .toBe('Hello, world!'); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /test/e2e/tools/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true 3 | } -------------------------------------------------------------------------------- /test/e2e/tools/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | middleware: require('./middleware') 5 | }; 6 | -------------------------------------------------------------------------------- /test/e2e/tools/middleware.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var url = require('url'); 4 | var util = require('./util'); 5 | var fixture = require('./fixture'); 6 | 7 | module.exports = middlewareFactory; 8 | 9 | function middlewareFactory(base) { 10 | base = base || '/e2e'; 11 | while (base.length && base[base.length - 1] === '/') base = base.slice(0, base.length - 1); 12 | var fixture_regexp = new RegExp('^' + base + '/fixtures/([a-zA-Z0-9_-]+)(/(index.html)?)?$'); 13 | var static_regexp = new RegExp('^' + base + '/fixtures/([a-zA-Z0-9_-]+)(/.*)$'); 14 | 15 | return function(req, res, next) { 16 | var match; 17 | var basicUrl = req.url; 18 | var idx = basicUrl.indexOf('?'); 19 | if (idx >= 0) { 20 | basicUrl = basicUrl.slice(0, idx); 21 | } 22 | if ((match = fixture_regexp.exec(basicUrl))) { 23 | if (util.testExists(match[1])) { 24 | try { 25 | var query = url.parse(req.url, true).query; 26 | res.write(fixture.generate(match[1], query)); 27 | res.end(); 28 | } catch (e) { 29 | return next(e); 30 | } 31 | } else { 32 | return next('Fixture ' + match[1] + ' not found.'); 33 | } 34 | } else if ((match = static_regexp.exec(basicUrl))) { 35 | var rewritten = util.rewriteTestFile(match[1], match[2]); 36 | if (rewritten !== false) { 37 | req.url = rewritten; 38 | } 39 | next(); 40 | } else { 41 | return next(); 42 | } 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /test/e2e/tools/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var fs = require('fs'); 4 | var path = require('path'); 5 | var url = require('url'); 6 | 7 | var root = path.resolve(__dirname, '..'); 8 | var tests = path.resolve(root, 'fixtures'); 9 | 10 | function stat(path) { 11 | try { 12 | return fs.statSync(path); 13 | } catch (e) { 14 | // Ignore ENOENT. 15 | if (e.code !== 'ENOENT') { 16 | throw e; 17 | } 18 | } 19 | } 20 | 21 | function testExists(testname) { 22 | var s = stat(path.resolve(tests, testname)); 23 | return s && s.isDirectory(); 24 | } 25 | 26 | function rewriteTestFile(testname, testfile) { 27 | var i = 0; 28 | while (testfile[i] === '/') ++i; 29 | testfile = testfile.slice(i); 30 | var s = stat(path.resolve(tests, testname, testfile)); 31 | if (s && (s.isFile() || s.isDirectory())) { 32 | return ['/test/e2e/fixtures', testname, testfile].join('/'); 33 | } 34 | return false; 35 | } 36 | 37 | module.exports = { 38 | stat: stat, 39 | testExists: testExists, 40 | rewriteTestFile: rewriteTestFile 41 | }; 42 | -------------------------------------------------------------------------------- /test/helpers/privateMocks.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function createMockStyleSheet(doc, wind) { 4 | doc = doc ? doc[0] : document; 5 | wind = wind || window; 6 | 7 | var node = doc.createElement('style'); 8 | var head = doc.getElementsByTagName('head')[0]; 9 | head.appendChild(node); 10 | 11 | var ss = doc.styleSheets[doc.styleSheets.length - 1]; 12 | 13 | return { 14 | addRule: function(selector, styles) { 15 | try { 16 | ss.insertRule(selector + '{ ' + styles + '}', 0); 17 | } 18 | catch (e) { 19 | try { 20 | ss.addRule(selector, styles); 21 | } 22 | catch (e2) {} 23 | } 24 | }, 25 | 26 | destroy: function() { 27 | head.removeChild(node); 28 | } 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /test/helpers/privateMocksSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('private mocks', function() { 4 | describe('createMockStyleSheet', function() { 5 | 6 | it('should allow custom styles to be created and removed when the stylesheet is destroyed', 7 | inject(function($compile, $document, $window, $rootElement, $rootScope) { 8 | 9 | var doc = $document[0]; 10 | var count = doc.styleSheets.length; 11 | var stylesheet = createMockStyleSheet($document, $window); 12 | var elm; 13 | runs(function() { 14 | expect(doc.styleSheets.length).toBe(count + 1); 15 | 16 | angular.element(doc.body).append($rootElement); 17 | 18 | elm = $compile('
...
')($rootScope); 19 | $rootElement.append(elm); 20 | 21 | expect(getStyle(elm, 'paddingTop')).toBe('0px'); 22 | 23 | stylesheet.addRule('.padded', 'padding-top:2px'); 24 | }); 25 | 26 | waitsFor(function() { 27 | return getStyle(elm, 'paddingTop') === '2px'; 28 | }); 29 | 30 | runs(function() { 31 | stylesheet.destroy(); 32 | 33 | expect(getStyle(elm, 'paddingTop')).toBe('0px'); 34 | }); 35 | 36 | function getStyle(element, key) { 37 | var node = element[0]; 38 | return node.currentStyle ? 39 | node.currentStyle[key] : 40 | $window.getComputedStyle(node)[key]; 41 | } 42 | })); 43 | 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /test/jquery_alias.js: -------------------------------------------------------------------------------- 1 | /* global _jQuery: true, _jqLiteMode: true */ 2 | 'use strict'; 3 | 4 | var _jQuery = jQuery, 5 | _jqLiteMode = false; 6 | -------------------------------------------------------------------------------- /test/jquery_remove.js: -------------------------------------------------------------------------------- 1 | /* global _jQuery: true, _jqLiteMode: true */ 2 | 'use strict'; 3 | 4 | var _jQuery = jQuery.noConflict(true), 5 | _jqLiteMode = true; 6 | -------------------------------------------------------------------------------- /test/ng/asyncCallbackSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | describe('$$asyncCallback', function() { 3 | it('should perform a callback asynchronously', inject(function($$asyncCallback) { 4 | var message = 'hello there '; 5 | $$asyncCallback(function() { 6 | message += 'Angular'; 7 | }); 8 | 9 | expect(message).toBe('hello there '); 10 | $$asyncCallback.flush(); 11 | expect(message).toBe('hello there Angular'); 12 | })); 13 | 14 | describe('mocks', function() { 15 | it('should queue up all async callbacks', inject(function($$asyncCallback) { 16 | var callback = jasmine.createSpy('callback'); 17 | $$asyncCallback(callback); 18 | $$asyncCallback(callback); 19 | $$asyncCallback(callback); 20 | expect(callback.callCount).toBe(0); 21 | 22 | $$asyncCallback.flush(); 23 | expect(callback.callCount).toBe(3); 24 | 25 | $$asyncCallback(callback); 26 | $$asyncCallback(callback); 27 | expect(callback.callCount).toBe(3); 28 | 29 | $$asyncCallback.flush(); 30 | expect(callback.callCount).toBe(5); 31 | })); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /test/ng/directive/ngClickSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('ngClick', function() { 4 | var element; 5 | 6 | afterEach(function() { 7 | dealoc(element); 8 | }); 9 | 10 | it('should get called on a click', inject(function($rootScope, $compile) { 11 | element = $compile('
')($rootScope); 12 | $rootScope.$digest(); 13 | expect($rootScope.clicked).toBeFalsy(); 14 | 15 | browserTrigger(element, 'click'); 16 | expect($rootScope.clicked).toEqual(true); 17 | })); 18 | 19 | it('should pass event object', inject(function($rootScope, $compile) { 20 | element = $compile('
')($rootScope); 21 | $rootScope.$digest(); 22 | 23 | browserTrigger(element, 'click'); 24 | expect($rootScope.event).toBeDefined(); 25 | })); 26 | }); 27 | -------------------------------------------------------------------------------- /test/ng/directive/ngCloakSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('ngCloak', function() { 4 | var element; 5 | 6 | 7 | afterEach(function() { 8 | dealoc(element); 9 | }); 10 | 11 | 12 | it('should get removed when an element is compiled', inject(function($rootScope, $compile) { 13 | element = jqLite('
'); 14 | expect(element.attr('ng-cloak')).toBe(''); 15 | $compile(element); 16 | expect(element.attr('ng-cloak')).toBeUndefined(); 17 | })); 18 | 19 | 20 | it('should remove ngCloak class from a compiled element with attribute', inject( 21 | function($rootScope, $compile) { 22 | element = jqLite('
'); 23 | 24 | expect(element.hasClass('foo')).toBe(true); 25 | expect(element.hasClass('ng-cloak')).toBe(true); 26 | expect(element.hasClass('bar')).toBe(true); 27 | 28 | $compile(element); 29 | 30 | expect(element.hasClass('foo')).toBe(true); 31 | expect(element.hasClass('ng-cloak')).toBe(false); 32 | expect(element.hasClass('bar')).toBe(true); 33 | })); 34 | 35 | 36 | it('should remove ngCloak class from a compiled element', inject(function($rootScope, $compile) { 37 | element = jqLite('
'); 38 | 39 | expect(element.hasClass('foo')).toBe(true); 40 | expect(element.hasClass('ng-cloak')).toBe(true); 41 | expect(element.hasClass('bar')).toBe(true); 42 | 43 | $compile(element); 44 | 45 | expect(element.hasClass('foo')).toBe(true); 46 | expect(element.hasClass('ng-cloak')).toBe(false); 47 | expect(element.hasClass('bar')).toBe(true); 48 | })); 49 | }); 50 | -------------------------------------------------------------------------------- /test/ng/directive/ngInitSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('ngInit', function() { 4 | var element; 5 | 6 | 7 | afterEach(function() { 8 | dealoc(element); 9 | }); 10 | 11 | 12 | it("should init model", inject(function($rootScope, $compile) { 13 | element = $compile('
')($rootScope); 14 | expect($rootScope.a).toEqual(123); 15 | })); 16 | 17 | 18 | it("should be evaluated before ngInclude", inject(function($rootScope, $templateCache, $compile) { 19 | $templateCache.put('template1.tpl', '1'); 20 | $templateCache.put('template2.tpl', '2'); 21 | $rootScope.template = 'template1.tpl'; 22 | element = $compile('
')($rootScope); 24 | $rootScope.$digest(); 25 | expect($rootScope.template).toEqual('template2.tpl'); 26 | expect(element.find('span').text()).toEqual('2'); 27 | })); 28 | 29 | 30 | it("should be evaluated after ngController", function() { 31 | module(function($controllerProvider) { 32 | $controllerProvider.register('TestCtrl', function($scope) {}); 33 | }); 34 | inject(function($rootScope, $compile) { 35 | element = $compile('
')($rootScope); 37 | $rootScope.$digest(); 38 | expect($rootScope.test).toBeUndefined(); 39 | expect(element.children('div').scope().test).toEqual(123); 40 | }); 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /test/ng/directive/ngKeySpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('ngKeyup and ngKeydown directives', function() { 4 | var element; 5 | 6 | afterEach(function() { 7 | dealoc(element); 8 | }); 9 | 10 | it('should get called on a keyup', inject(function($rootScope, $compile) { 11 | element = $compile('')($rootScope); 12 | $rootScope.$digest(); 13 | expect($rootScope.touched).toBeFalsy(); 14 | 15 | browserTrigger(element, 'keyup'); 16 | expect($rootScope.touched).toEqual(true); 17 | })); 18 | 19 | it('should get called on a keydown', inject(function($rootScope, $compile) { 20 | element = $compile('')($rootScope); 21 | $rootScope.$digest(); 22 | expect($rootScope.touched).toBeFalsy(); 23 | 24 | browserTrigger(element, 'keydown'); 25 | expect($rootScope.touched).toEqual(true); 26 | })); 27 | 28 | it('should get called on a keypress', inject(function($rootScope, $compile) { 29 | element = $compile('')($rootScope); 30 | $rootScope.$digest(); 31 | expect($rootScope.touched).toBeFalsy(); 32 | 33 | browserTrigger(element, 'keypress'); 34 | expect($rootScope.touched).toEqual(true); 35 | })); 36 | 37 | }); 38 | 39 | -------------------------------------------------------------------------------- /test/ng/directive/ngNonBindableSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | describe('ngNonBindable', function() { 5 | var element; 6 | 7 | 8 | afterEach(function() { 9 | dealoc(element); 10 | }); 11 | 12 | 13 | it('should prevent compilation of the owning element and its children', 14 | inject(function($rootScope, $compile) { 15 | element = $compile('
')($rootScope); 16 | element = $compile('
' + 17 | ' {{a}}' + 18 | ' ' + 19 | '
' + 20 | ' {{b}}' + 21 | '
' + 22 | ' {{a}}' + 23 | ' ' + 24 | '
')($rootScope); 25 | $rootScope.a = "one"; 26 | $rootScope.b = "two"; 27 | $rootScope.$digest(); 28 | // Bindings not contained by ng-non-bindable should resolve. 29 | var spans = element.find("span"); 30 | expect(spans.eq(0).text()).toEqual('one'); 31 | expect(spans.eq(1).text()).toEqual('two'); 32 | expect(spans.eq(3).text()).toEqual('one'); 33 | expect(spans.eq(4).text()).toEqual('two'); 34 | // Bindings contained by ng-non-bindable should be left alone. 35 | var nonBindableDiv = element.find("div"); 36 | expect(nonBindableDiv.attr('foo')).toEqual('{{a}}'); 37 | expect(trim(nonBindableDiv.text())).toEqual('{{b}}'); 38 | })); 39 | }); 40 | -------------------------------------------------------------------------------- /test/ng/directive/ngSrcsetSpec.js: -------------------------------------------------------------------------------- 1 | /*jshint scripturl:true*/ 2 | 'use strict'; 3 | 4 | describe('ngSrcset', function() { 5 | var element; 6 | 7 | afterEach(function() { 8 | dealoc(element); 9 | }); 10 | 11 | it('should not result empty string in img srcset', inject(function($rootScope, $compile) { 12 | $rootScope.image = {}; 13 | element = $compile('')($rootScope); 14 | $rootScope.$digest(); 15 | expect(element.attr('srcset')).toBeUndefined(); 16 | })); 17 | 18 | it('should sanitize good urls', inject(function($rootScope, $compile) { 19 | $rootScope.imageUrl = 'http://example.com/image1.png 1x, http://example.com/image2.png 2x'; 20 | element = $compile('')($rootScope); 21 | $rootScope.$digest(); 22 | expect(element.attr('srcset')).toBe('http://example.com/image1.png 1x,http://example.com/image2.png 2x'); 23 | })); 24 | 25 | it('should sanitize evil url', inject(function($rootScope, $compile) { 26 | $rootScope.imageUrl = 'http://example.com/image1.png 1x, javascript:doEvilStuff() 2x'; 27 | element = $compile('')($rootScope); 28 | $rootScope.$digest(); 29 | expect(element.attr('srcset')).toBe('http://example.com/image1.png 1x,unsafe:javascript:doEvilStuff() 2x'); 30 | })); 31 | }); 32 | 33 | -------------------------------------------------------------------------------- /test/ng/directive/scriptSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('scriptDirective', function() { 4 | var element; 5 | 6 | 7 | afterEach(function() { 8 | dealoc(element); 9 | }); 10 | 11 | 12 | it('should populate $templateCache with contents of a ng-template script element', inject( 13 | function($compile, $templateCache) { 14 | $compile('
foo' + 15 | '' + 16 | '' + 17 | '
'); 18 | expect($templateCache.get('/myTemplate.html')).toBe('{{y}}'); 19 | expect($templateCache.get('/ignore')).toBeUndefined(); 20 | } 21 | )); 22 | 23 | 24 | it('should not compile scripts', inject(function($compile, $templateCache, $rootScope) { 25 | var doc = jqLite('
'); 26 | // jQuery is too smart and removes script tags 27 | doc[0].innerHTML = 'foo' + 28 | '' + 29 | ''; 30 | 31 | $compile(doc)($rootScope); 32 | $rootScope.$digest(); 33 | 34 | var scripts = doc.find('script'); 35 | expect(scripts.eq(0)[0].text).toBe('some {{binding}}'); 36 | expect(scripts.eq(1)[0].text).toBe('other {{binding}}'); 37 | dealoc(doc); 38 | })); 39 | }); 40 | -------------------------------------------------------------------------------- /test/ng/documentSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('$document', function() { 4 | 5 | 6 | it("should inject $document", inject(function($document) { 7 | expect($document).toEqual(jqLite(document)); 8 | })); 9 | }); 10 | -------------------------------------------------------------------------------- /test/ng/exceptionHandlerSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('$exceptionHandler', function() { 4 | /* global $ExceptionHandlerProvider:false */ 5 | it('should log errors with single argument', function() { 6 | module(function($provide) { 7 | $provide.provider('$exceptionHandler', $ExceptionHandlerProvider); 8 | }); 9 | inject(function($log, $exceptionHandler) { 10 | $exceptionHandler('myError'); 11 | expect($log.error.logs.shift()).toEqual(['myError']); 12 | }); 13 | }); 14 | 15 | 16 | it('should log errors with multiple arguments', function() { 17 | module(function($provide) { 18 | $provide.provider('$exceptionHandler', $ExceptionHandlerProvider); 19 | }); 20 | inject(function($log, $exceptionHandler) { 21 | $exceptionHandler('myError', 'comment'); 22 | expect($log.error.logs.shift()).toEqual(['myError', 'comment']); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /test/ng/filterSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('$filter', function() { 4 | var $filterProvider, $filter; 5 | 6 | beforeEach(module(function(_$filterProvider_) { 7 | $filterProvider = _$filterProvider_; 8 | })); 9 | 10 | beforeEach(inject(function(_$filter_) { 11 | $filter = _$filter_; 12 | })); 13 | 14 | describe('provider', function() { 15 | it('should allow registration of filters', function() { 16 | var FooFilter = function() { 17 | return function() { return 'foo'; }; 18 | }; 19 | 20 | $filterProvider.register('foo', FooFilter); 21 | 22 | var fooFilter = $filter('foo'); 23 | expect(fooFilter()).toBe('foo'); 24 | }); 25 | 26 | it('should allow registration of a map of filters', function() { 27 | var FooFilter = function() { 28 | return function() { return 'foo'; }; 29 | }; 30 | 31 | var BarFilter = function() { 32 | return function() { return 'bar'; }; 33 | }; 34 | 35 | $filterProvider.register({ 36 | 'foo': FooFilter, 37 | 'bar': BarFilter 38 | }); 39 | 40 | var fooFilter = $filter('foo'); 41 | expect(fooFilter()).toBe('foo'); 42 | 43 | var barFilter = $filter('bar'); 44 | expect(barFilter()).toBe('bar'); 45 | }); 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /test/ng/localeSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('$locale', function() { 4 | /* global $LocaleProvider: false */ 5 | 6 | var $locale = new $LocaleProvider().$get(); 7 | 8 | it('should have locale id set to en-us', function() { 9 | expect($locale.id).toBe('en-us'); 10 | }); 11 | 12 | 13 | it('should have NUMBER_FORMATS', function() { 14 | var numberFormats = $locale.NUMBER_FORMATS; 15 | expect(numberFormats).toBeDefined(); 16 | expect(numberFormats.PATTERNS.length).toBe(2); 17 | angular.forEach(numberFormats.PATTERNS, function(pattern) { 18 | expect(pattern.minInt).toBeDefined(); 19 | expect(pattern.minFrac).toBeDefined(); 20 | expect(pattern.maxFrac).toBeDefined(); 21 | expect(pattern.posPre).toBeDefined(); 22 | expect(pattern.posSuf).toBeDefined(); 23 | expect(pattern.negPre).toBeDefined(); 24 | expect(pattern.negSuf).toBeDefined(); 25 | expect(pattern.gSize).toBeDefined(); 26 | expect(pattern.lgSize).toBeDefined(); 27 | }); 28 | }); 29 | 30 | 31 | it('should have DATETIME_FORMATS', function() { 32 | var datetime = $locale.DATETIME_FORMATS; 33 | expect(datetime).toBeDefined(); 34 | expect(datetime.DAY.length).toBe(7); 35 | expect(datetime.SHORTDAY.length).toBe(7); 36 | expect(datetime.SHORTMONTH.length).toBe(12); 37 | expect(datetime.MONTH.length).toBe(12); 38 | expect(datetime.AMPMS.length).toBe(2); 39 | }); 40 | 41 | 42 | it('should return correct plural types', function() { 43 | expect($locale.pluralCat(-1)).toBe('other'); 44 | expect($locale.pluralCat(0)).toBe('other'); 45 | expect($locale.pluralCat(2)).toBe('other'); 46 | expect($locale.pluralCat(1)).toBe('one'); 47 | }); 48 | }); 49 | -------------------------------------------------------------------------------- /test/ng/rootElementSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('$rootElement', function() { 4 | it('should publish the bootstrap element into $rootElement', function() { 5 | var element = jqLite('
'); 6 | var injector = angular.bootstrap(element); 7 | 8 | expect(injector.get('$rootElement')[0]).toBe(element[0]); 9 | 10 | dealoc(element); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /test/ng/windowSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('$window', function() { 4 | it("should inject $window", inject(function($window) { 5 | expect($window).toBe(window); 6 | })); 7 | 8 | it('should be able to mock $window without errors', function() { 9 | module({$window: {}}); 10 | inject(['$sce', angular.noop]); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /test/ngSanitize/directive/ngBindHtmlSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | describe('ngBindHtml', function() { 5 | beforeEach(module('ngSanitize')); 6 | 7 | it('should set html', inject(function($rootScope, $compile) { 8 | var element = $compile('
')($rootScope); 9 | $rootScope.html = '
hello
'; 10 | $rootScope.$digest(); 11 | expect(angular.lowercase(element.html())).toEqual('
hello
'); 12 | })); 13 | 14 | 15 | it('should reset html when value is null or undefined', inject(function($compile, $rootScope) { 16 | var element = $compile('
')($rootScope); 17 | 18 | angular.forEach([null, undefined, ''], function(val) { 19 | $rootScope.html = 'some val'; 20 | $rootScope.$digest(); 21 | expect(angular.lowercase(element.html())).toEqual('some val'); 22 | 23 | $rootScope.html = val; 24 | $rootScope.$digest(); 25 | expect(angular.lowercase(element.html())).toEqual(''); 26 | }); 27 | })); 28 | }); 29 | -------------------------------------------------------------------------------- /test/ngScenario/ScenarioSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe("ScenarioSpec: Compilation", function() { 4 | var element; 5 | 6 | afterEach(function() { 7 | dealoc(element); 8 | }); 9 | 10 | 11 | describe('compilation', function() { 12 | it("should compile dom node and return scope", inject(function($rootScope, $compile) { 13 | var node = jqLite('
{{b=a+1}}
')[0]; 14 | element = $compile(node)($rootScope); 15 | $rootScope.$digest(); 16 | expect($rootScope.a).toEqual(1); 17 | expect($rootScope.b).toEqual(2); 18 | })); 19 | 20 | it("should compile jQuery node and return scope", inject(function($rootScope, $compile) { 21 | element = $compile(jqLite('
{{a=123}}
'))($rootScope); 22 | $rootScope.$digest(); 23 | expect(jqLite(element).text()).toEqual('123'); 24 | })); 25 | 26 | it("should compile text node and return scope", inject(function($rootScope, $compile) { 27 | element = $compile('
{{a=123}}
')($rootScope); 28 | $rootScope.$digest(); 29 | expect(jqLite(element).text()).toEqual('123'); 30 | })); 31 | }); 32 | 33 | describe('jQuery', function() { 34 | it('should exist on the angular.scenario object', function() { 35 | expect(angular.scenario.jQuery).toBeDefined(); 36 | }); 37 | 38 | it('should have common jQuery methods', function() { 39 | var jQuery = angular.scenario.jQuery; 40 | expect(typeof jQuery).toEqual('function'); 41 | expect(typeof jQuery('
').html).toEqual('function'); 42 | }); 43 | }); 44 | }); 45 | -------------------------------------------------------------------------------- /test/ngScenario/e2e/Runner-compiled.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/ngScenario/e2e/Runner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/ngScenario/e2e/style.css: -------------------------------------------------------------------------------- 1 | th { 2 | text-align: left; 3 | } 4 | 5 | tr { 6 | border: 1px solid black; 7 | } 8 | 9 | .redbox { 10 | background-color: red; 11 | } 12 | -------------------------------------------------------------------------------- /test/ngScenario/mocks.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.scenario.testing = angular.scenario.testing || {}; 4 | 5 | angular.scenario.testing.MockAngular = function() { 6 | this.reset(); 7 | this.element = jqLite; 8 | }; 9 | 10 | angular.scenario.testing.MockAngular.prototype.reset = function() { 11 | this.log = []; 12 | }; 13 | 14 | angular.scenario.testing.MockAngular.prototype.poll = function() { 15 | this.log.push('$brower.poll()'); 16 | return this; 17 | }; 18 | 19 | angular.scenario.testing.MockRunner = function() { 20 | this.listeners = []; 21 | }; 22 | 23 | angular.scenario.testing.MockRunner.prototype.on = function(eventName, fn) { 24 | this.listeners[eventName] = this.listeners[eventName] || []; 25 | this.listeners[eventName].push(fn); 26 | }; 27 | 28 | angular.scenario.testing.MockRunner.prototype.emit = function(eventName) { 29 | var args = Array.prototype.slice.call(arguments, 1); 30 | angular.forEach(this.listeners[eventName] || [], function(fn) { 31 | fn.apply(this, args); 32 | }); 33 | }; 34 | -------------------------------------------------------------------------------- /test/ngScenario/output/jsonSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('angular.scenario.output.json', function() { 4 | var output, context; 5 | var runner, model, $window; 6 | var spec, step; 7 | 8 | beforeEach(function() { 9 | $window = {}; 10 | context = _jQuery('
'); 11 | runner = new angular.scenario.testing.MockRunner(); 12 | model = new angular.scenario.ObjectModel(runner); 13 | output = angular.scenario.output.json(context, runner, model); 14 | spec = { 15 | name: 'test spec', 16 | definition: { 17 | id: 10, 18 | name: 'describe' 19 | } 20 | }; 21 | step = { 22 | name: 'some step', 23 | line: function() { return 'unknown:-1'; } 24 | }; 25 | }); 26 | 27 | it('should put json in context on RunnerEnd', function() { 28 | runner.emit('SpecBegin', spec); 29 | runner.emit('StepBegin', spec, step); 30 | runner.emit('StepEnd', spec, step); 31 | runner.emit('SpecEnd', spec); 32 | runner.emit('RunnerEnd'); 33 | 34 | expect(angular.fromJson(context.html()).children['describe'] 35 | .specs['test spec'].status).toEqual('success'); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /test/ngScenario/output/objectSpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('angular.scenario.output.object', function() { 4 | var output; 5 | var runner, model, $window; 6 | var spec, step; 7 | 8 | beforeEach(function() { 9 | $window = {}; 10 | runner = new angular.scenario.testing.MockRunner(); 11 | model = new angular.scenario.ObjectModel(runner); 12 | runner.$window = $window; 13 | output = angular.scenario.output.object(null, runner, model); 14 | spec = { 15 | name: 'test spec', 16 | definition: { 17 | id: 10, 18 | name: 'describe', 19 | children: [] 20 | } 21 | }; 22 | step = { 23 | name: 'some step', 24 | line: function() { return 'unknown:-1'; } 25 | }; 26 | }); 27 | 28 | it('should create a global variable $result', function() { 29 | expect($window.$result).toBeDefined(); 30 | }); 31 | 32 | it('should maintain live state in $result', function() { 33 | runner.emit('SpecBegin', spec); 34 | runner.emit('StepBegin', spec, step); 35 | runner.emit('StepEnd', spec, step); 36 | 37 | expect($window.$result.children['describe'] 38 | .specs['test spec'].steps[0].duration).toBeDefined(); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /test/stringifySpec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('toDebugString', function() { 4 | it('should convert its argument to a string', function() { 5 | expect(toDebugString('string')).toEqual('string'); 6 | expect(toDebugString(123)).toEqual('123'); 7 | expect(toDebugString({a:{b:'c'}})).toEqual('{"a":{"b":"c"}}'); 8 | expect(toDebugString(function fn() { var a = 10; })).toEqual('function fn()'); 9 | expect(toDebugString()).toEqual('undefined'); 10 | var a = { }; 11 | a.a = a; 12 | expect(toDebugString(a)).toEqual('{"a":"<>"}'); 13 | expect(toDebugString([a,a])).toEqual('[{"a":"<>"},"<>"]'); 14 | }); 15 | }); 16 | --------------------------------------------------------------------------------