angular-cn/aio
Victor Berchet bf8eb41248 feat(compiler): introduce `<ng-template>`, deprecate `<template>` and `template` attribute
The rationale of this change is to improve the inter-operability with web
components that might make use of the `<template>` tag.

DEPRECATION

The template tags and template attribute are deprecated:

    <template ngFor [ngFor]=items let-item><li>...</li></template>
    <li template="ngFor: let item of items">...</li>

should be rewritten as:

    <ng-template ngFor [ngFor]=items let-item><li>...</li></ng-template>

Note that they still be supported in 4.x with a deprecartion warning in
development mode.

MIGRATION

- `template` tags (or elements with a `template` attribute) should be rewritten
as a `ng-template` tag,
- `ng-content` selectors should be updated to referto a `ng-template` where they
use to refer to a template: `<ng-content selector="template[attr]">` should be
rewritten as `<ng-content selector="ng-template[attr]">`
- if you consume a component relying on your templates being actual `template`
elements (that is they include a `<ng-content selector="template[attr]">`). You
should  still migrate to `ng-template` and make use of `ngProjectAs` to override
the way `ng-content` sees the template:
`<ng-template projectAs="template[attr]">`
- while `template` elements are deprecated in 4.x they continue to work.
2017-02-23 20:03:16 -08:00
..
build build(aio): big move of docs related files (#14361) 2017-02-09 11:58:36 -08:00
content feat(compiler): introduce `<ng-template>`, deprecate `<template>` and `template` attribute 2017-02-23 20:03:16 -08:00
e2e test(aio): redefine pipe test as a pending test to confirm code example 2017-02-22 17:53:56 -08:00
src build(aio): upgrade to CLI beta.32 and MD beta.2 2017-02-22 17:53:56 -08:00
transforms feat(aio): add sidenav driven by navigation data (#14429) 2017-02-15 11:22:37 -08:00
.angular-cli.json build(aio): upgrade to CLI beta.32 and MD beta.2 2017-02-22 17:53:56 -08:00
.firebaserc build(aio): big move of docs related files (#14361) 2017-02-09 11:58:36 -08:00
README.md build(aio): big move of docs related files (#14361) 2017-02-09 11:58:36 -08:00
database.rules.json build(aio): big move of docs related files (#14361) 2017-02-09 11:58:36 -08:00
firebase.json fix(aio): use cleanUrls option rather than bruteforce rewriting rule (#14547) 2017-02-16 15:26:59 -08:00
gulpfile.js build: check yarn version in `check-environment` (#14499) 2017-02-22 20:55:25 -08:00
karma.conf.js build(aio): upgrade to CLI beta.32 and MD beta.2 2017-02-22 17:53:56 -08:00
package.json build: check yarn version in `check-environment` (#14499) 2017-02-22 20:55:25 -08:00
protractor.conf.js build(aio): upgrade to CLI beta.32 and MD beta.2 2017-02-22 17:53:56 -08:00
tslint.json build(aio): upgrade to CLI beta.32 and MD beta.2 2017-02-22 17:53:56 -08:00
yarn.lock build(aio): upgrade to CLI beta.32 and MD beta.2 2017-02-22 17:53:56 -08:00

README.md

Site

This project was generated with angular-cli version 1.0.0-beta.26.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive/pipe/service/class/module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app via ng serve.

Deploying to GitHub Pages

Run ng github-pages:deploy to deploy to GitHub Pages.

Further help

To get more help on the angular-cli use ng help or go check out the Angular-CLI README.