refactor: rename all const to UPPER_CASE
Closes #3573 BREAKING CHANGE Rename: - `appComponentTypeToken` => `APP_COMPONENT` - `coreDirectives` => `CORE_DIRECTIVES` - `formDirectives` => `FORM_DIRECTIVES` - `formInjectables` => `FORM_BINDINGS` - `httpInjectables` => `HTTP_BINDINGS` - `jsonpInjectables` => `JSONP_BINDINGS` - `PROTO_CHANGE_DETECTOR_KEY` => `PROTO_CHANGE_DETECTOR` - `appComponentRefPromiseToken` => `APP_COMPONENT_REF_PROMISE` - `appComponentTypeToken` => `APP_COMPONENT` - `undefinedValue` => `UNDEFINED` - `formDirectives` => `FORM_DIRECTIVES` - `DOCUMENT_TOKEN` => `DOCUMENT` - `APP_ID_TOKEN` => `APP_ID` - `MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE_TOKEN` => `MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE` - `appBaseHrefToken` => `APP_BASE_HREF`
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
/// <reference path="../../../angular2/typings/rx/rx.d.ts" />
|
||||
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {httpInjectables} from 'http/http';
|
||||
import {HTTP_BINDINGS} from 'http/http';
|
||||
import {HttpCmp} from './http_comp';
|
||||
|
||||
export function main() {
|
||||
bootstrap(HttpCmp, [httpInjectables]);
|
||||
bootstrap(HttpCmp, [HTTP_BINDINGS]);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {HttpCmp} from './http_comp';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {httpInjectables} from 'http/http';
|
||||
import {HTTP_BINDINGS} from 'http/http';
|
||||
|
||||
export function main() {
|
||||
// This entry point is not transformed and exists for testing dynamic mode.
|
||||
bootstrap(HttpCmp, [httpInjectables]);
|
||||
bootstrap(HttpCmp, [HTTP_BINDINGS]);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/// <reference path="../../../angular2/typings/rx/rx.d.ts" />
|
||||
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {jsonpInjectables} from 'http/http';
|
||||
import {JSONP_BINDINGS} from 'http/http';
|
||||
import {JsonpCmp} from './jsonp_comp';
|
||||
|
||||
export function main() {
|
||||
bootstrap(JsonpCmp, [jsonpInjectables]);
|
||||
bootstrap(JsonpCmp, [JSONP_BINDINGS]);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {JsonpCmp} from './jsonp_comp';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {jsonpInjectables} from 'http/http';
|
||||
import {JSONP_BINDINGS} from 'http/http';
|
||||
|
||||
export function main() {
|
||||
bootstrap(JsonpCmp, [jsonpInjectables]);
|
||||
bootstrap(JsonpCmp, [JSONP_BINDINGS]);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {bootstrap, NgIf, NgFor, Component, Directive, View, Host} from 'angular2/bootstrap';
|
||||
import {formDirectives, NgControl, Validators, NgFormModel, FormBuilder} from 'angular2/forms';
|
||||
import {FORM_DIRECTIVES, NgControl, Validators, NgFormModel, FormBuilder} from 'angular2/forms';
|
||||
|
||||
import {RegExpWrapper, print, isPresent} from 'angular2/src/facade/lang';
|
||||
|
||||
@ -117,7 +117,7 @@ class ShowError {
|
||||
<button type="submit" [disabled]="!f.form.valid">Submit</button>
|
||||
</form>
|
||||
`,
|
||||
directives: [formDirectives, NgFor, ShowError]
|
||||
directives: [FORM_DIRECTIVES, NgFor, ShowError]
|
||||
})
|
||||
class ModelDrivenForms {
|
||||
form;
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
|
||||
import {Injectable} from 'angular2/di';
|
||||
|
||||
import {formDirectives} from 'angular2/forms';
|
||||
import {FORM_DIRECTIVES} from 'angular2/forms';
|
||||
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
@ -109,7 +109,7 @@ class DataService {
|
||||
<button (click)="select(order)">Select</button>
|
||||
</div>
|
||||
`,
|
||||
directives: [formDirectives, NgFor]
|
||||
directives: [FORM_DIRECTIVES, NgFor]
|
||||
})
|
||||
class OrderListComponent {
|
||||
orders: Order[];
|
||||
@ -143,7 +143,7 @@ class OrderListComponent {
|
||||
<button (click)="onDelete()">Delete</button>
|
||||
</div>
|
||||
`,
|
||||
directives: [formDirectives]
|
||||
directives: [FORM_DIRECTIVES]
|
||||
})
|
||||
class OrderItemComponent {
|
||||
item: OrderItem;
|
||||
@ -180,7 +180,7 @@ class OrderItemComponent {
|
||||
<order-item-cmp *ng-for="#item of order.items" [item]="item" (delete)="deleteItem(item)"></order-item-cmp>
|
||||
</div>
|
||||
`,
|
||||
directives: [formDirectives, OrderItemComponent, NgFor, NgIf]
|
||||
directives: [FORM_DIRECTIVES, OrderItemComponent, NgFor, NgIf]
|
||||
})
|
||||
class OrderDetailsComponent {
|
||||
constructor(private service: DataService) {}
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
|
||||
import {Injectable} from 'angular2/di';
|
||||
|
||||
import {formDirectives} from 'angular2/forms';
|
||||
import {FORM_DIRECTIVES} from 'angular2/forms';
|
||||
|
||||
import {CONST_EXPR} from 'angular2/src/facade/lang';
|
||||
|
||||
@ -113,7 +113,7 @@ class DataService {
|
||||
</form>
|
||||
</div>
|
||||
`,
|
||||
directives: [formDirectives]
|
||||
directives: [FORM_DIRECTIVES]
|
||||
})
|
||||
class FullNameComponent {
|
||||
constructor(private service: DataService) {}
|
||||
@ -161,7 +161,7 @@ class FullNameComponent {
|
||||
</form>
|
||||
</div>
|
||||
`,
|
||||
directives: [formDirectives, NgIf]
|
||||
directives: [FORM_DIRECTIVES, NgIf]
|
||||
})
|
||||
class PersonsDetailComponent {
|
||||
constructor(private service: DataService) {}
|
||||
@ -182,7 +182,7 @@ class PersonsDetailComponent {
|
||||
<person-detail-cmp></person-detail-cmp>
|
||||
</div>
|
||||
`,
|
||||
directives: [formDirectives, PersonsDetailComponent, NgFor]
|
||||
directives: [FORM_DIRECTIVES, PersonsDetailComponent, NgFor]
|
||||
})
|
||||
class PersonsComponent {
|
||||
persons: Person[];
|
||||
|
@ -2,7 +2,7 @@ import {InboxApp} from './inbox-app';
|
||||
import {bind} from 'angular2/angular2';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {routerInjectables, HashLocationStrategy, LocationStrategy} from 'angular2/router';
|
||||
import {httpInjectables} from 'http/http';
|
||||
import {HTTP_BINDINGS} from 'http/http';
|
||||
|
||||
import {reflector} from 'angular2/src/reflection/reflection';
|
||||
import {ReflectionCapabilities} from 'angular2/src/reflection/reflection_capabilities';
|
||||
@ -11,5 +11,5 @@ export function main() {
|
||||
reflector.reflectionCapabilities = new ReflectionCapabilities();
|
||||
bootstrap(
|
||||
InboxApp,
|
||||
[routerInjectables, httpInjectables, bind(LocationStrategy).toClass(HashLocationStrategy)]);
|
||||
[routerInjectables, HTTP_BINDINGS, bind(LocationStrategy).toClass(HashLocationStrategy)]);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
forwardRef,
|
||||
Binding
|
||||
} from 'angular2/bootstrap';
|
||||
import {formDirectives, NgControl, Validators, NgForm} from 'angular2/forms';
|
||||
import {FORM_DIRECTIVES, NgControl, Validators, NgForm} from 'angular2/forms';
|
||||
|
||||
import {RegExpWrapper, print, isPresent, CONST_EXPR} from 'angular2/src/facade/lang';
|
||||
|
||||
@ -151,7 +151,7 @@ class ShowError {
|
||||
<button type="submit" [disabled]="!f.form.valid">Submit</button>
|
||||
</form>
|
||||
`,
|
||||
directives: [formDirectives, NgFor, CreditCardValidator, ShowError]
|
||||
directives: [FORM_DIRECTIVES, NgFor, CreditCardValidator, ShowError]
|
||||
})
|
||||
class TemplateDrivenForms {
|
||||
model = new CheckoutModel();
|
||||
|
@ -1,11 +1,11 @@
|
||||
import {NgZone, NgFor, Component, View, NgIf, formDirectives} from 'angular2/angular2';
|
||||
import {NgZone, NgFor, Component, View, NgIf, FORM_DIRECTIVES} from 'angular2/angular2';
|
||||
import {BitmapService} from './services/bitmap';
|
||||
import {EventListener} from 'angular2/src/facade/browser';
|
||||
import {FileReader, Uint8ArrayWrapper} from './file_api';
|
||||
import {TimerWrapper} from 'angular2/src/facade/async';
|
||||
|
||||
@Component({selector: 'image-demo', viewBindings: [BitmapService]})
|
||||
@View({templateUrl: 'image_demo.html', directives: [NgFor, NgIf, formDirectives]})
|
||||
@View({templateUrl: 'image_demo.html', directives: [NgFor, NgIf, FORM_DIRECTIVES]})
|
||||
export class ImageDemo {
|
||||
images = [];
|
||||
fileInput: String;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {NgFor, Component, View, formDirectives} from 'angular2/angular2';
|
||||
import {NgFor, Component, View, FORM_DIRECTIVES} from 'angular2/angular2';
|
||||
import {Store, Todo, TodoFactory} from './services/TodoStore';
|
||||
|
||||
@Component({selector: 'todo-app', viewBindings: [Store, TodoFactory]})
|
||||
@View({templateUrl: 'todo.html', directives: [NgFor, formDirectives]})
|
||||
@View({templateUrl: 'todo.html', directives: [NgFor, FORM_DIRECTIVES]})
|
||||
export class TodoApp {
|
||||
todoEdit: Todo = null;
|
||||
inputValue: string;
|
||||
|
Reference in New Issue
Block a user