Go to file
Filipe Silva 52f6693f91 docs(upgrade): Use NgUpgrade static (#2781)
* re-enable upgrade-adapter and upgrade-phonecat-1 tests

* re-enable upgrade-phonecat-2 tests

* add hybrid toggle switch to helpers

* use 2.2.0-rc.0

* revert change to browser.ignoreSynchronization

* convert 1-2-hybrid-bootstrap to upgrade/static

* remove shared adapter example

* add systemjs config extras to all indexes

* update upgrade-static

* update upgrade-io example

* update downgrade-static

* update downgrade-io

* update 1-to-2-projection

* update 2-to-1-transclusion

* update 1-to-2-providers

* update 2-to-1-providers

* cleanup upgrade-adapter e2e test

* re-enable upgrade-adapter tests

* change HeroDetailComponent to HeroDetailDirective

* fix missing systemjs.config.extras

* add typing to UpgradeModule DI

* update upgrade-phonecat-2-hybrid

* update upgrade-adapter's prose

* rename upgrade-adapter example to upgrade-module

* improve angular1 type declaration in hybrid apps

* remove unused imports in protractor-helpers

* update phonecat-hybrid bootstrap prose

* update phonecat-hybrid service and components

* update phonecat-final prose

* update e2e prose

* update systemjs.config.js to have @angular/upgrade/static by default

* add aot (WIP)

* remove wip aot changes from test run

* change let to const in bootstrap

* elaborate upgraded component alert

* use 2.2.0 versions instead of rc0

* Squashed commit of the following:

commit 17c7e15467
Author: Filipe Silva <filipematossilva@gmail.com>
Date:   Mon Nov 14 23:11:37 2016 +0000

    chore: update to 2.2.0 (#2797)

commit 1e5facfb98
Merge: 5c4cc9a db0fac9
Author: Ward Bell <wardbell@hotmail.com>
Date:   Mon Nov 14 12:44:51 2016 -0800

    Merge pull request #2799 from IdeaBlade/docs-changelog-2.2.0

    chore(changelog): update docs changelog for Ng v.2.2.0

commit 5c4cc9a3c8
Merge: 43457e9 1afe5dc
Author: Ward Bell <wardbell@hotmail.com>
Date:   Mon Nov 14 12:43:09 2016 -0800

    docs(router): Updated usage of observables in router tutorial and developer guide (#2696)

    Moved route configuration into separate variable for consistency
    Added async pipe to handle subscriptions for list items

commit 43457e9765
Merge: a423a5a 2649647
Author: Jesús Rodríguez <Foxandxss@gmail.com>
Date:   Mon Nov 14 21:38:49 2016 +0100

    chore: add upgrade/static to API reference (#2755)

commit 1afe5dc97d
Author: Brandon Roberts <robertsbt@gmail.com>
Date:   Sat Oct 29 16:08:54 2016 -0500

    docs(router): Updated usage of observables in router tutorial and developer guide

    Moved route configuration into separate variable for consistency
    Added async pipe to handle subscriptions for list items

commit db0fac94c9
Author: Ward Bell <wardbell@hotmail.com>
Date:   Mon Nov 14 10:48:09 2016 -0800

    chore(changelog): update docs changelog for Ng v.2.2.0

commit a423a5abc7
Author: ikilled <ikilled@users.noreply.github.com>
Date:   Mon Nov 14 18:39:46 2016 +0000

    clicking on Books & Training sends user to Education (#2701)

    When user clicks in Books & Training item in footer the website should take them to Education section (anchor) in the middle of the page, not to the top where Development section is.

commit d63b1ccea3
Merge: f627706 8508140
Author: Ward Bell <wardbell@hotmail.com>
Date:   Mon Nov 14 10:35:48 2016 -0800

    docs(router): fixed verbiage about router-outlet (#2746)

commit f627706779
Author: Ward Bell <wardbell@hotmail.com>
Date:   Mon Nov 14 10:26:13 2016 -0800

    docs(cookbook-aot-compiler): improve Ahead-of-Time compilation cookbook (#2798)

    closes #2790

commit 75464d585c
Merge: 78e2584 02f5559
Author: Ward Bell <wardbell@hotmail.com>
Date:   Mon Nov 14 09:34:36 2016 -0800

    Merge pull request #2794 from IdeaBlade/chalin-guide-misc-fix-1113

    docs: guide/index misc Jade fixes

commit 78e25840b2
Merge: 182493f 85062c4
Author: Ward Bell <wardbell@hotmail.com>
Date:   Mon Nov 14 09:33:55 2016 -0800

    Merge pull request #2795 from IdeaBlade/chalin-util-js-getExampleName-1114

    chore(util.js): getExampleName - support optional .html suffix

commit 182493f877
Merge: 9e9666b 53f5538
Author: Ward Bell <wardbell@hotmail.com>
Date:   Mon Nov 14 09:28:40 2016 -0800

    feat(cb-ts-to-js): add es6 examples (#2606)

    * feat(cb-ts-to-js): add es6 examples
    update docshredder to shred .es6
    optimized focus gulp task
    convert imports and metadate sections
    add DI section
    add host and query metadata section
    add intro
    fix capitalization and grammar

    * docs(ts-to-js): ward's edits (incomplete)

    * docs(ts-to-js): add separate template files for some components

    * docs(cb-ts-to-js): refactor sample code

commit 53f5538859
Author: Ward Bell <wardbell@hotmail.com>
Date:   Sun Nov 13 14:09:28 2016 -0800

    docs(cb-ts-to-js): refactor sample code

commit 9e9666b2cc
Author: Patrice Chalin <chalin@users.noreply.github.com>
Date:   Mon Nov 14 08:34:10 2016 -0800

    docs(template-syntax/dart): updates to match TS (#2751)

    * docs(template-syntax): refresh _cache

    * docs(template-syntax/dart): updates to match TS

    - Propagates TS-side changes:
      - update #2639 - new two-way binding section, and
      - fix #2687 - invalid attr syntax
    - Fixes
      - #1898 - currency symbols
      - #2748 - Dart template-syntax e2e is failing
      - #2749 - deprecated `[className]`

    * updated _cache file following Kathy's post-review edits

    * Post Ward's review w/ cache updated

    - Keep `my-` and `my` prefixes on selectors (for components and
    directives, respectively).
    - Drop `my-` from file names.
    - Drop `My` as component class prefix.

commit 5dcffd69dc
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Sun Nov 13 19:37:13 2016 -0800

    docs: dart glossary - fix misnamed Jade block

commit 6680acc513
Merge: 14db838 3b03573
Author: Kathy Walrath <kathyw@google.com>
Date:   Mon Nov 14 08:31:11 2016 -0800

    docs(toh): avoid dup header title (#2796)

    * remove redundant headings

    * update _cache

    * misc: make block comment a Jade comment

    (This prevents the text from appearing in the generated HTML as an HTML
    comment.)

commit 3b03573f34
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Mon Nov 14 05:30:05 2016 -0800

    misc: make block comment a Jade comment

    (This prevents the text from appearing in the generated HTML as an HTML
    comment.)

commit 470426d5e0
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Mon Nov 14 05:25:36 2016 -0800

    update _cache

commit c12d75a477
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Mon Nov 14 05:23:35 2016 -0800

    remove redundant headings

commit 85062c47ca
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Mon Nov 14 04:56:12 2016 -0800

    chore(util.js): getExampleName - support optional .html suffix

commit 02f55592b2
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Mon Nov 14 04:29:17 2016 -0800

    docs: guide/index misc Jade fixes

    - Eliminate use of deprecated `clear=“all”` in `<br>`.
    - No need for local `langName`; use global `_Lang` var instead.
    - Remove duplicate id `learning-path`.

commit 14db838f8b
Author: Naomi Black <naomitraveller@gmail.com>
Date:   Sun Nov 13 21:48:52 2016 -0500

    news(nov): Some news and a blog post update

commit eff32ecbdd
Author: Naomi Black <naomitraveller@gmail.com>
Date:   Sun Nov 13 21:48:37 2016 -0500

    chore(bios): update some bios for leads

commit 3ee36fbba2
Author: koyner <markburrett@gmail.com>
Date:   Sun Nov 13 22:59:59 2016 +0100

    docs(forms): grammar fix (#2764)

commit b11438f211
Author: Ward Bell <wardbell@hotmail.com>
Date:   Fri Nov 11 19:44:00 2016 -0800

    docs(ts-to-js): add separate template files for some components

commit 33b61977b2
Author: Ward Bell <wardbell@hotmail.com>
Date:   Thu Nov 3 01:37:55 2016 -0700

    docs(ts-to-js): ward's edits (incomplete)

commit 12eb19fa3c
Author: Filipe Silva <filipematossilva@gmail.com>
Date:   Thu Oct 13 17:59:00 2016 +0100

    feat(cb-ts-to-js): add es6 examples
    update docshredder to shred .es6
    optimized focus gulp task
    convert imports and metadate sections
    add DI section
    add host and query metadata section
    add intro
    fix capitalization and grammar

commit 64a8754386
Author: Patrice Chalin <chalin@users.noreply.github.com>
Date:   Thu Nov 10 20:01:36 2016 -0800

    example(template-syntax): follow style-guide and other updates (#2750)

commit 7619cdf4a4
Author: Jesús Rodríguez <Foxandxss@gmail.com>
Date:   Thu Nov 10 23:47:30 2016 +0100

    chore: ability to open a plunker on a specific file (#2778)

commit 0161d9db39
Author: Filipe Silva <filipematossilva@gmail.com>
Date:   Thu Nov 10 22:45:22 2016 +0000

    chore: ignore debug.log file (#2785)

    This file is generated when running `gulp e2e` and often enough committed by mistake.

    /cc @foxandxss

commit f92983cc6f
Author: Jesús Rodríguez <Foxandxss@gmail.com>
Date:   Thu Nov 10 23:44:51 2016 +0100

    docs(ngmodule): fix plunkers (#2786)

commit 03db4bbc48
Author: Martin Eckardt <m.eckardt@outlook.com>
Date:   Wed Nov 9 17:43:40 2016 +0100

    docs(a1-a2): fix link to Filter/Pipes (#2770)

commit 60565a5cf1
Author: Pavol Pitonak <pavol@pitonak.com>
Date:   Wed Nov 9 17:42:57 2016 +0100

    docs(testing): configureTestModule -> configureTestingModule (#2767)

commit ec471974a7
Author: Catalin Zalog <xxxxxcata@yahoo.com>
Date:   Wed Nov 9 18:41:56 2016 +0200

    docs(style-guide): fix missing *.ts (#2763)

commit 234e468d5d
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Tue Nov 8 08:21:02 2016 -0800

    docs: intra-site links should be relative

    Contributes to #2772.

commit 6b37da78e4
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Tue Nov 8 09:27:10 2016 -0800

    docs(forms/dart): remove mention of FORM_DIRECTIVES

    Fixes #2752

commit c24dd074a6
Author: Patrice Chalin <chalin@users.noreply.github.com>
Date:   Tue Nov 8 14:48:03 2016 -0800

    docs(toh-5/dart): use routerLink in dashboard (#2744)

    * docs(toh-5/dart): use routerLink in dashboard

    * minor edits to TS jade

    * remove dart/toh-pt5 from bad-code-excerpt-skip-patterns

commit 2808878c36
Author: Patrice Chalin <pchalin@gmail.com>
Date:   Tue Nov 8 07:41:27 2016 -0800

    chore(deploy): don't name project in firebase deploy

    Naming the project would sometimes cause gulp to report `An unexpected
    error has occurred` with exit code 2.

commit 2649647ecb
Author: Jesus Rodriguez <Foxandxss@gmail.com>
Date:   Sat Nov 5 00:37:47 2016 +0100

    chore: add upgrade/static to API reference

commit 850814097f
Merge: 37f93bc b1c2c27
Author: Adrian Irwin <mr.irwin@gmail.com>
Date:   Thu Nov 3 17:27:43 2016 -0700

    Merge branch 'router' of https://github.com/adrianirwin/angular.io into router

commit 37f93bc0cb
Author: Adrian Irwin <mr.irwin@gmail.com>
Date:   Thu Nov 3 17:25:55 2016 -0700

    docs(router): fixed verbiage and example of how routed views are related to the router outlet

commit b1c2c27d36
Author: Adrian Irwin <adrianirwin@kpmg.com>
Date:   Thu Nov 3 16:57:56 2016 -0700

    docs(router): fixed verbiage and example of how routed views are related to the router outlet

* deactivate bugged tests
2016-11-15 01:23:48 +00:00
public deactivate bugged tests 2016-11-15 01:05:55 +00:00
scripts Squashed commit of the following: 2016-11-15 00:44:35 +00:00
tools Squashed commit of the following: 2016-11-15 00:44:35 +00:00
.editorconfig chore: remove end_of_line from editorconfig (#2635) 2016-10-19 18:17:06 +01:00
.eslintrc.js chore(eslint): add eslint config file 2016-09-09 14:44:46 -07:00
.firebaserc chore: fix firebase.json; check-deploy to active firebase project 2016-11-04 11:05:51 -07:00
.gitignore Squashed commit of the following: 2016-11-15 00:44:35 +00:00
.nvmrc chore: update to node 6 (#2301) 2016-09-09 22:23:25 -04:00
.travis.yml Squashed commit of the following: 2016-11-15 00:44:35 +00:00
LICENSE chore: update license to MIT 2016-01-08 14:10:38 -08:00
README.md chore: update to @types (#1872) 2016-10-20 17:01:16 -07:00
firebase.json chore: fix firebase.json; check-deploy to active firebase project 2016-11-04 11:05:51 -07:00
gulpfile.js Squashed commit of the following: 2016-11-15 00:44:35 +00:00
harp.json Squashed commit of the following: 2016-11-15 00:44:35 +00:00
package.json chore: update harp release and drop terraform patch script (#2754) 2016-11-04 21:11:32 +00:00
pubspec.yaml chore(dart): update to 2.0.0 (#2680) 2016-10-26 16:36:21 +02:00
tslint.json chore: update tslint rules 2016-09-14 15:07:57 +02:00

README.md

Angular.io

Build Status

Angular.io is site for Angular documentation .

This site also includes links to other helpful angular resources including Angular 2, Angular 1, Angular Material, and AngularFire.

Issues

Please file Developer Guide, Cookbook, and code sample issues only in this Angular.io github repo.

Angular API issues, cheatsheet corrections, feature requests, defect reports, and technical questions concerning Angular itself belong in the angular source code github repo. We can't handle those topics here and will ask you to re-post them on the angular repo.

How you can help

Filing issues is helpful but pull requests that improve the docs are even better!

Learn how to contribute to Angular.io.

IMPORTANT: Do NOT make changes to cached files under public/docs/ts/_cache. Cached files are updated through a separate workflow.

Development Setup

This site relies heavily on node and npm.

  1. Make sure you are using at least node v.5+ and latest npm; if not install nvm to get node going on your machine.

  2. Install these npm packages globally: npm install -g harp gulp

  3. Clone this repo, the angular/angular source code repo, and the dart-lang/angular2 source code repo to the same parent directory. The three cloned repo directories must be siblings, with the latter two repo directories named angular and angular-dart, respectively.

  4. cd into root directory angular.io/

  5. install the all-docs local packages by running npm install

You probably must rebuild node-sass in a separate step: npm rebuild node-sass

  1. See below for code sample development preparation.

Content Development

All documentation content is written in Jade which has its own syntax. Be aware of the strict demands imposed by this significant-whitespace language. We strongly recommend running one of the gulp serve-and-sync commands described below while editing content so you can see the effect of your changes as you type.

The documentation relies on specific styles and mixins. Learn about those in the documentation styleguide.

The jade documentation files are language-specific directories under either public/docs/. For example, all of the TypeScript docs are in public/docs/ts/latest, e.g.

  • public/docs/ts/latest/quickstart.jade
  • public/docs/ts/latest/guide/architecture.jade
  • public/docs/ts/latest/cookbook/component-communication.jade
  • public/docs/ts/latest/tutorial/toh-pt5.jade

Local server with watches and browser reload

  1. cd into root directory angular.io/
  2. run gulp serve-and-sync
  3. browser will launch on localhost:3000 and stay refreshed automatically.

If you are only going to work on a specific part of the docs, such as the dev guide, then you can use one of the more specific gulp tasks to only watch those parts of the file system:

  • gulp serve-and-sync : watch all the local Jade/Sass files, the API source and examples, and the dev guide files
  • gulp serve-and-sync-api : watch only the API source and example files
  • gulp serve-and-sync-devguide : watch only the dev guide files
  • gulp build-and-serve : watch only the local Jade/Sass files

Code Sample Development

All documentation is supported by sample code and plunkers. Such code resides in the public/docs/_examples directory, under page-specific directories, further divided by language track.

For example, the TypeScript QuickStart sample is in public/docs/_examples/quickstart/ts.

All samples are in a consistent directory structure using the same styles and the same npm packages, including the latest release of Angular. This consistency is possible in part thanks to gulp-driven tooling. To run the samples locally and confirm that they work properly, take the following extra steps to prepare the environment:

  1. cd to public/docs/_examples

  2. install the canonical node packages for all samples by running npm install

  3. cd back up to angular.io root: cd ../../..

  4. run gulp add-example-boilerplate (elevate to admin on Windows) to copy canonical files to the sample directories and create symlinks there for node_modules.

Now cd into any particular sample's language directory (e.g., public/docs/_examples/quickstart/ts) and try:

  • npm start to simultaneously compile-with-watch and serve-in-browser-with-watch
  • npm run tsc to compile only
  • npm run lite to serve-and-watch in browser

Look at the scripts in package.json for other options. Also, open any plunkr.no-link.html to see the code execute in plunker (you may have to run gulp build-plunkers first to create/update).

You must check that your example is free of lint errors.

  • gulp lint

Sample end-to-end tests

All samples should be covered to some degree by end-to-end tests:

  • gulp run-e2e-tests to run all TypeScript and JavaScript tests
  • gulp run-e2e-tests --lang=dart to run all Dart tests
  • gulp run-e2e-tests --lang=all to run TypeScript, JavaScript, and Dart tests
  • gulp run-e2e-tests --filter=quickstart to filter the examples to run, by name
  • gulp run-e2e-tests --fast to ignore npm install, webdriver update and boilerplate copy

Any combination of options is possible.

Resetting the project

This project generates a lot of untracked files, if you wish to reset it to a mint state, you can run:

  • git clean -xdf

Also, there is a script available for Linux, OSX and Windows Gitbash users that will setup the project using the steps shown in this section:

  • ./scripts/install.sh

Run with current build instead of release packages

Can switch the @angular packages in ~/public/docs/_examples/node_modules to the current build packages with

gulp install-example-angular --build

Restore to RELEASE packages with

gulp install-example-angular

These commands will fail if something is locking any of the packages ... as an IDE often does.

The symptom typically is an error trying to rm -rf node_modules/@angular.

Solution: unlock the hold on the package(s). In VS Code, re-load the window (cmd-P then enter >relow).

Technology Used

  • Angular 1.x: The production ready version of Angular
  • Angular Material: An implementation of Material Design in Angular.js
  • Gulp: node-based tooling
  • Harp: The static web server with built-in preprocessing.
  • Sass: A professional grade CSS extension language
  • Normalize: A modern, HTML5-ready alternative to CSS resets
  • Grids: A highly customizable CSS Grid Framework built with Sass
  • Prettify: A JS module and CSS for syntax highlighting of source code snippets.
  • Icomoon: Custom built icon fonts

License

Powered by Google ©2010-2016. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.