chore(docs): remove @View decorator from examples in docs

Closes #4666
This commit is contained in:
Alex Eagle
2015-10-11 07:41:19 -07:00
committed by Alex Eagle
parent 62005dd127
commit b96784756c
36 changed files with 181 additions and 263 deletions

View File

@ -23,8 +23,7 @@ import {EventListener, History, Location} from 'angular2/src/core/facade/browser
* Location
* } from 'angular2/router';
*
* @Component({...})
* @View({directives: [ROUTER_DIRECTIVES]})
* @Component({directives: [ROUTER_DIRECTIVES]})
* @RouteConfig([
* {...},
* ])

View File

@ -15,18 +15,16 @@ import {Url} from './url_parser';
* ## Example
*
* ```
* import {bootstrap, Component, View} from 'angular2/angular2';
* import {bootstrap, Component} from 'angular2/angular2';
* import {Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
*
* @Component({...})
* @View({directives: [ROUTER_DIRECTIVES]})
* @Component({directives: [ROUTER_DIRECTIVES]})
* @RouteConfig([
* {path: '/user/:id', component: UserCmp, as: 'UserCmp'},
* ])
* class AppCmp {}
*
* @Component({...})
* @View({ template: 'user: {{id}}' })
* @Component({ template: 'user: {{id}}' })
* class UserCmp {
* string: id;
* constructor(params: RouteParams) {
@ -53,11 +51,10 @@ export class RouteParams {
* ## Example
*
* ```
* import {bootstrap, Component, View} from 'angular2/angular2';
* import {bootstrap, Component} from 'angular2/angular2';
* import {Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
*
* @Component({...})
* @View({directives: [ROUTER_DIRECTIVES]})
* @Component({directives: [ROUTER_DIRECTIVES]})
* @RouteConfig([
* {...},
* ])

View File

@ -23,14 +23,12 @@ var __ignore_me = global;
*
* ## Example
* ```
* import {Component, View} from 'angular2/angular2';
* import {Component} from 'angular2/angular2';
* import {OnActivate, ComponentInstruction} from 'angular2/router';
*
* @Component({
* selector: 'my-cmp'
* })
* @View({
* template: '<div>hello!</div>'
* selector: 'my-cmp',
* template: '<div>hello!</div>'
* })
* class MyCmp implements OnActivate {
* onActivate(next: ComponentInstruction, prev: ComponentInstruction) {
@ -56,14 +54,12 @@ export interface OnActivate {
*
* ## Example
* ```
* import {Component, View} from 'angular2/angular2';
* import {Component} from 'angular2/angular2';
* import {CanReuse, OnReuse, ComponentInstruction} from 'angular2/router';
*
* @Component({
* selector: 'my-cmp'
* })
* @View({
* template: '<div>hello!</div>'
* selector: 'my-cmp',
* template: '<div>hello!</div>'
* })
* class MyCmp implements CanReuse, OnReuse {
* canReuse(next: ComponentInstruction, prev: ComponentInstruction) {
@ -92,14 +88,12 @@ export interface OnReuse {
*
* ## Example
* ```
* import {Component, View} from 'angular2/angular2';
* import {Component} from 'angular2/angular2';
* import {OnDeactivate, ComponentInstruction} from 'angular2/router';
*
* @Component({
* selector: 'my-cmp'
* })
* @View({
* template: '<div>hello!</div>'
* selector: 'my-cmp',
* template: '<div>hello!</div>'
* })
* class MyCmp implements OnDeactivate {
* onDeactivate(next: ComponentInstruction, prev: ComponentInstruction) {
@ -129,14 +123,12 @@ export interface OnDeactivate {
*
* ## Example
* ```
* import {Component, View} from 'angular2/angular2';
* import {Component} from 'angular2/angular2';
* import {CanReuse, OnReuse, ComponentInstruction} from 'angular2/router';
*
* @Component({
* selector: 'my-cmp'
* })
* @View({
* template: '<div>hello!</div>'
* selector: 'my-cmp',
* template: '<div>hello!</div>'
* })
* class MyCmp implements CanReuse, OnReuse {
* canReuse(next: ComponentInstruction, prev: ComponentInstruction) {
@ -169,14 +161,12 @@ export interface CanReuse {
*
* ## Example
* ```
* import {Component, View} from 'angular2/angular2';
* import {Component} from 'angular2/angular2';
* import {CanDeactivate, ComponentInstruction} from 'angular2/router';
*
* @Component({
* selector: 'my-cmp'
* })
* @View({
* template: '<div>hello!</div>'
* selector: 'my-cmp',
* template: '<div>hello!</div>'
* })
* class MyCmp implements CanDeactivate {
* canDeactivate(next: ComponentInstruction, prev: ComponentInstruction) {

View File

@ -39,10 +39,8 @@ export {
* import {CanActivate} from 'angular2/router';
*
* @Component({
* selector: 'control-panel-cmp'
* })
* @View({
* template: '<div>Control Panel: ...</div>'
* selector: 'control-panel-cmp',
* template: '<div>Control Panel: ...</div>'
* })
* @CanActivate(() => checkIfUserIsLoggedIn())
* class ControlPanelCmp {

View File

@ -16,11 +16,10 @@ import {OpaqueToken, Injectable, Optional, Inject} from 'angular2/src/core/di';
* ## Example
*
* ```
* import {Component, View} from 'angular2/angular2';
* import {Component} from 'angular2/angular2';
* import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
*
* @Component({...})
* @View({directives: [ROUTER_DIRECTIVES]})
* @Component({directives: [ROUTER_DIRECTIVES]})
* @RouteConfig([
* {...},
* ])
@ -56,7 +55,7 @@ export const APP_BASE_HREF: OpaqueToken = CONST_EXPR(new OpaqueToken('appBaseHre
* ## Example
*
* ```
* import {Component, View} from 'angular2/angular2';
* import {Component} from 'angular2/angular2';
* import {
* ROUTER_DIRECTIVES,
* ROUTER_PROVIDERS,
@ -64,8 +63,7 @@ export const APP_BASE_HREF: OpaqueToken = CONST_EXPR(new OpaqueToken('appBaseHre
* Location
* } from 'angular2/router';
*
* @Component({...})
* @View({directives: [ROUTER_DIRECTIVES]})
* @Component({directives: [ROUTER_DIRECTIVES]})
* @RouteConfig([
* {...},
* ])

View File

@ -23,7 +23,7 @@ import {LocationStrategy} from './location_strategy';
* ## Example
*
* ```
* import {Component, View, provide} from 'angular2/angular2';
* import {Component, provide} from 'angular2/angular2';
* import {
* APP_BASE_HREF
* ROUTER_DIRECTIVES,
@ -32,8 +32,7 @@ import {LocationStrategy} from './location_strategy';
* Location
* } from 'angular2/router';
*
* @Component({...})
* @View({directives: [ROUTER_DIRECTIVES]})
* @Component({directives: [ROUTER_DIRECTIVES]})
* @RouteConfig([
* {...},
* ])