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:
@@ -20,7 +20,7 @@ import {bind, Inject, Injector} from 'angular2/di';
|
||||
import {LifeCycle} from 'angular2/core';
|
||||
import {ExceptionHandler} from 'angular2/src/core/exception_handler';
|
||||
import {Testability, TestabilityRegistry} from 'angular2/src/core/testability/testability';
|
||||
import {DOCUMENT_TOKEN} from 'angular2/src/render/render';
|
||||
import {DOCUMENT} from 'angular2/src/render/render';
|
||||
|
||||
@Component({selector: 'hello-app'})
|
||||
@View({template: '{{greeting}} world!'})
|
||||
@@ -87,7 +87,7 @@ export function main() {
|
||||
DOM.appendChild(fakeDoc.body, el2);
|
||||
DOM.appendChild(el, lightDom);
|
||||
DOM.setText(lightDom, 'loading');
|
||||
testBindings = [bind(DOCUMENT_TOKEN).toValue(fakeDoc)];
|
||||
testBindings = [bind(DOCUMENT).toValue(fakeDoc)];
|
||||
});
|
||||
|
||||
it('should throw if bootstrapped Directive is not a Component',
|
||||
|
||||
@@ -24,7 +24,7 @@ import {Component, View, LifecycleEvent} from 'angular2/annotations';
|
||||
import * as viewAnn from 'angular2/src/core/annotations_impl/view';
|
||||
import {DynamicComponentLoader} from 'angular2/src/core/compiler/dynamic_component_loader';
|
||||
import {ElementRef} from 'angular2/src/core/compiler/element_ref';
|
||||
import {DOCUMENT_TOKEN} from 'angular2/src/render/render';
|
||||
import {DOCUMENT} from 'angular2/src/render/render';
|
||||
import {DOM} from 'angular2/src/dom/dom_adapter';
|
||||
|
||||
export function main() {
|
||||
@@ -218,7 +218,7 @@ export function main() {
|
||||
|
||||
describe('loadAsRoot', () => {
|
||||
it('should allow to create, update and destroy components',
|
||||
inject([AsyncTestCompleter, DynamicComponentLoader, DOCUMENT_TOKEN, Injector],
|
||||
inject([AsyncTestCompleter, DynamicComponentLoader, DOCUMENT, Injector],
|
||||
(async, loader, doc, injector) => {
|
||||
var rootEl = el('<child-cmp></child-cmp>');
|
||||
DOM.appendChild(doc.body, rootEl);
|
||||
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
ViewEncapsulation
|
||||
} from 'angular2/angular2';
|
||||
|
||||
import {MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE_TOKEN} from 'angular2/src/render/render';
|
||||
import {MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE} from 'angular2/src/render/render';
|
||||
|
||||
export function main() {
|
||||
describe('projection', () => {
|
||||
@@ -445,12 +445,12 @@ export function main() {
|
||||
}
|
||||
|
||||
describe('serialize templates', () => {
|
||||
beforeEachBindings(() => [bind(MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE_TOKEN).toValue(0)]);
|
||||
beforeEachBindings(() => [bind(MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE).toValue(0)]);
|
||||
runTests();
|
||||
});
|
||||
|
||||
describe("don't serialize templates", () => {
|
||||
beforeEachBindings(() => [bind(MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE_TOKEN).toValue(-1)]);
|
||||
beforeEachBindings(() => [bind(MAX_IN_MEMORY_ELEMENTS_PER_TEMPLATE).toValue(-1)]);
|
||||
runTests();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user