@@ -42,7 +42,7 @@ class RedDec {
|
||||
selector: 'hello-app',
|
||||
// These are services that would be created if a class in the component's
|
||||
// template tries to inject them.
|
||||
viewBindings: [GreetingService],
|
||||
viewProviders: [GreetingService],
|
||||
// Expressions in the template (like {{greeting}}) are evaluated in the
|
||||
// context of the HelloCmp class below.
|
||||
template: `<div class="greeting">{{greeting}} <span red>world</span>!</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {HTTP_BINDINGS} from 'angular2/http';
|
||||
import {HTTP_PROVIDERS} from 'angular2/http';
|
||||
import {HttpCmp} from './http_comp';
|
||||
|
||||
export function main() {
|
||||
bootstrap(HttpCmp, [HTTP_BINDINGS]);
|
||||
bootstrap(HttpCmp, [HTTP_PROVIDERS]);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {JSONP_BINDINGS} from 'angular2/http';
|
||||
import {JSONP_PROVIDERS} from 'angular2/http';
|
||||
import {JsonpCmp} from './jsonp_comp';
|
||||
|
||||
export function main() {
|
||||
bootstrap(JsonpCmp, [JSONP_BINDINGS]);
|
||||
bootstrap(JsonpCmp, [JSONP_PROVIDERS]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bind, Component, NgFor, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {bind, provide, Component, NgFor, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {MdButton, MdAnchor} from 'angular2_material/src/components/button/button';
|
||||
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
|
||||
|
||||
@@ -40,5 +40,5 @@ class DemoApp {
|
||||
|
||||
export function main() {
|
||||
commonDemoSetup();
|
||||
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
||||
bootstrap(DemoApp, [provide(UrlResolver, {asValue: new DemoUrlResolver()})]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bind, Component, Directive, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {
|
||||
bind,
|
||||
provide,
|
||||
Component,
|
||||
Directive,
|
||||
UrlResolver,
|
||||
View,
|
||||
ViewEncapsulation
|
||||
} from 'angular2/core';
|
||||
import {MdCheckbox} from 'angular2_material/src/components/checkbox/checkbox';
|
||||
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
|
||||
|
||||
@@ -26,5 +34,5 @@ class DemoApp {
|
||||
|
||||
export function main() {
|
||||
commonDemoSetup();
|
||||
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
||||
bootstrap(DemoApp, [provide(UrlResolver, {asValue: new DemoUrlResolver()})]);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {
|
||||
bind,
|
||||
provide,
|
||||
ElementRef,
|
||||
ComponentRef,
|
||||
Component,
|
||||
@@ -19,7 +20,7 @@ import {isPresent} from 'angular2/src/core/facade/lang';
|
||||
|
||||
@Component({
|
||||
selector: 'demo-app',
|
||||
viewBindings: [MdDialog],
|
||||
viewProviders: [MdDialog],
|
||||
})
|
||||
@View({
|
||||
templateUrl: './demo_app.html',
|
||||
@@ -101,5 +102,5 @@ class SimpleDialogComponent {
|
||||
|
||||
export function main() {
|
||||
commonDemoSetup();
|
||||
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
||||
bootstrap(DemoApp, [provide(UrlResolver, {asValue: new DemoUrlResolver()})]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bind, Component, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {bind, provide, Component, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {MdGridList, MdGridTile} from 'angular2_material/src/components/grid_list/grid_list';
|
||||
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
|
||||
|
||||
@@ -24,5 +24,5 @@ class DemoApp {
|
||||
|
||||
export function main() {
|
||||
commonDemoSetup();
|
||||
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
||||
bootstrap(DemoApp, [provide(UrlResolver, {asValue: new DemoUrlResolver()})]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bind, Component, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {bind, provide, Component, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {MdInputContainer, MdInput} from 'angular2_material/src/components/input/input';
|
||||
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
|
||||
|
||||
@@ -15,5 +15,5 @@ class DemoApp {
|
||||
|
||||
export function main() {
|
||||
commonDemoSetup();
|
||||
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
||||
bootstrap(DemoApp, [provide(UrlResolver, {asValue: new DemoUrlResolver()})]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bind, Component, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {bind, provide, Component, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {MdProgressLinear} from 'angular2_material/src/components/progress-linear/progress_linear';
|
||||
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
|
||||
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
|
||||
@@ -26,5 +26,5 @@ class DemoApp {
|
||||
|
||||
export function main() {
|
||||
commonDemoSetup();
|
||||
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
||||
bootstrap(DemoApp, [provide(UrlResolver, {asValue: new DemoUrlResolver()})]);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bind, Component, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {bind, provide, Component, UrlResolver, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {MdRadioButton, MdRadioGroup} from 'angular2_material/src/components/radio/radio_button';
|
||||
import {MdRadioDispatcher} from 'angular2_material/src/components/radio/radio_dispatcher';
|
||||
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
|
||||
|
||||
@Component({
|
||||
selector: 'demo-app',
|
||||
viewBindings: [MdRadioDispatcher],
|
||||
viewProviders: [MdRadioDispatcher],
|
||||
})
|
||||
@View({
|
||||
templateUrl: './demo_app.html',
|
||||
@@ -43,5 +43,5 @@ class DemoApp {
|
||||
|
||||
export function main() {
|
||||
commonDemoSetup();
|
||||
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
||||
bootstrap(DemoApp, [provide(UrlResolver, {asValue: new DemoUrlResolver()})]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {bind, Component, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {bind, provide, Component, View, ViewEncapsulation} from 'angular2/core';
|
||||
import {MdSwitch} from 'angular2_material/src/components/switcher/switch';
|
||||
import {UrlResolver} from 'angular2/src/core/compiler/url_resolver';
|
||||
import {commonDemoSetup, DemoUrlResolver} from '../demo_common';
|
||||
@@ -26,5 +26,5 @@ class DemoApp {
|
||||
|
||||
export function main() {
|
||||
commonDemoSetup();
|
||||
bootstrap(DemoApp, [bind(UrlResolver).toValue(new DemoUrlResolver())]);
|
||||
bootstrap(DemoApp, [provide(UrlResolver, {asValue: new DemoUrlResolver()})]);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class ShowError {
|
||||
}
|
||||
|
||||
|
||||
@Component({selector: 'model-driven-forms', viewBindings: [FormBuilder]})
|
||||
@Component({selector: 'model-driven-forms', viewProviders: [FormBuilder]})
|
||||
@View({
|
||||
template: `
|
||||
<h1>Checkout Form (Model Driven)</h1>
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
View,
|
||||
Host,
|
||||
forwardRef,
|
||||
Binding,
|
||||
Provider,
|
||||
EventEmitter,
|
||||
FORM_DIRECTIVES,
|
||||
Injectable
|
||||
@@ -189,7 +189,7 @@ class OrderDetailsComponent {
|
||||
addItem(): void { this._service.addItemForOrder(this.order); }
|
||||
}
|
||||
|
||||
@Component({selector: 'order-management-app', viewBindings: [DataService]})
|
||||
@Component({selector: 'order-management-app', bindings: [DataService]})
|
||||
@View({
|
||||
template: `
|
||||
<order-list-cmp></order-list-cmp>
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
View,
|
||||
Host,
|
||||
forwardRef,
|
||||
Binding,
|
||||
Provider,
|
||||
FORM_DIRECTIVES,
|
||||
Injectable
|
||||
} from 'angular2/core';
|
||||
|
||||
@@ -131,7 +131,7 @@ class DraftsCmp {
|
||||
}
|
||||
}
|
||||
|
||||
@Component({selector: 'inbox-app', viewBindings: [DbService]})
|
||||
@Component({selector: 'inbox-app', viewProviders: [DbService]})
|
||||
@View({templateUrl: "inbox-app.html", directives: [RouterOutlet, RouterLink]})
|
||||
@RouteConfig([
|
||||
new Route({path: '/', component: InboxCmp, as: 'Inbox'}),
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import {InboxApp} from './inbox-app';
|
||||
import {bind} from 'angular2/angular2';
|
||||
import {bind, provide} from 'angular2/angular2';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {ROUTER_BINDINGS, HashLocationStrategy, LocationStrategy} from 'angular2/router';
|
||||
import {ROUTER_PROVIDERS, HashLocationStrategy, LocationStrategy} from 'angular2/router';
|
||||
|
||||
import {reflector} from 'angular2/src/core/reflection/reflection';
|
||||
import {ReflectionCapabilities} from 'angular2/src/core/reflection/reflection_capabilities';
|
||||
|
||||
export function main() {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
bootstrap(InboxApp, [ROUTER_BINDINGS, bind(LocationStrategy).toClass(HashLocationStrategy)]);
|
||||
bootstrap(InboxApp,
|
||||
[ROUTER_PROVIDERS, provide(LocationStrategy, {asClass: HashLocationStrategy})]);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Host,
|
||||
NG_VALIDATORS,
|
||||
forwardRef,
|
||||
Binding,
|
||||
Provider,
|
||||
FORM_DIRECTIVES,
|
||||
NgControl,
|
||||
Validators,
|
||||
@@ -44,7 +44,7 @@ function creditCardValidator(c): {[key: string]: boolean} {
|
||||
}
|
||||
|
||||
const creditCardValidatorBinding =
|
||||
CONST_EXPR(new Binding(NG_VALIDATORS, {toValue: creditCardValidator, multi: true}));
|
||||
CONST_EXPR(new Provider(NG_VALIDATORS, {toValue: creditCardValidator, multi: true}));
|
||||
|
||||
@Directive({selector: '[credit-card]', bindings: [creditCardValidatorBinding]})
|
||||
class CreditCardValidator {
|
||||
|
||||
@@ -2,7 +2,7 @@ import {bootstrap} from 'angular2/bootstrap';
|
||||
import {NgFor, Component, View} from 'angular2/core';
|
||||
import {Store, Todo, TodoFactory} from './services/TodoStore';
|
||||
|
||||
@Component({selector: 'todo-app', viewBindings: [Store, TodoFactory]})
|
||||
@Component({selector: 'todo-app', viewProviders: [Store, TodoFactory]})
|
||||
@View({templateUrl: 'todo.html', directives: [NgFor]})
|
||||
class TodoApp {
|
||||
todoEdit: Todo = null;
|
||||
|
||||
@@ -4,7 +4,7 @@ import {EventListener} from 'angular2/src/core/facade/browser';
|
||||
import {FileReader, Uint8ArrayWrapper} from './file_api';
|
||||
import {TimerWrapper} from 'angular2/src/core/facade/async';
|
||||
|
||||
@Component({selector: 'image-demo', viewBindings: [BitmapService]})
|
||||
@Component({selector: 'image-demo', viewProviders: [BitmapService]})
|
||||
@View({templateUrl: 'image_demo.html', directives: [NgFor, NgIf, FORM_DIRECTIVES]})
|
||||
export class ImageDemo {
|
||||
images = [];
|
||||
|
||||
@@ -32,7 +32,7 @@ class RedDec {
|
||||
selector: 'hello-app',
|
||||
// These are services that would be created if a class in the component's
|
||||
// template tries to inject them.
|
||||
viewBindings: [GreetingService]
|
||||
viewProviders: [GreetingService]
|
||||
})
|
||||
// The template for the component.
|
||||
@View({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {NgFor, View, Component, FORM_DIRECTIVES} from 'angular2/web_worker/worker';
|
||||
import {Store, Todo, TodoFactory} from './services/TodoStore';
|
||||
|
||||
@Component({selector: 'todo-app', viewBindings: [Store, TodoFactory]})
|
||||
@Component({selector: 'todo-app', viewProviders: [Store, TodoFactory]})
|
||||
@View({templateUrl: 'todo.html', directives: [NgFor, FORM_DIRECTIVES]})
|
||||
export class TodoApp {
|
||||
todoEdit: Todo = null;
|
||||
|
||||
Reference in New Issue
Block a user