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:
@ -4,7 +4,7 @@ import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
|
||||
import {BaseException, isBlank} from 'angular2/src/facade/lang';
|
||||
import {OpaqueToken, Injectable, Optional, Inject} from 'angular2/di';
|
||||
|
||||
export const appBaseHrefToken: OpaqueToken = CONST_EXPR(new OpaqueToken('locationHrefToken'));
|
||||
export const APP_BASE_HREF: OpaqueToken = CONST_EXPR(new OpaqueToken('appBaseHref'));
|
||||
|
||||
/**
|
||||
* This is the service that an application developer will directly interact with.
|
||||
@ -22,7 +22,7 @@ export class Location {
|
||||
private _baseHref: string;
|
||||
|
||||
constructor(public _platformStrategy: LocationStrategy,
|
||||
@Optional() @Inject(appBaseHrefToken) href?: string) {
|
||||
@Optional() @Inject(APP_BASE_HREF) href?: string) {
|
||||
var browserBaseHref = isPresent(href) ? href : this._platformStrategy.getBaseHref();
|
||||
|
||||
if (isBlank(browserBaseHref)) {
|
||||
|
@ -4,7 +4,7 @@ import {isBlank, isPresent} from 'angular2/src/facade/lang';
|
||||
|
||||
import {Directive, Attribute} from 'angular2/src/core/annotations/decorators';
|
||||
import {DynamicComponentLoader, ComponentRef, ElementRef} from 'angular2/core';
|
||||
import {Injector, bind, Dependency, undefinedValue} from 'angular2/di';
|
||||
import {Injector, bind, Dependency, UNDEFINED} from 'angular2/di';
|
||||
|
||||
import * as routerMod from './router';
|
||||
import {Instruction, ComponentInstruction, RouteParams} from './instruction';
|
||||
|
Reference in New Issue
Block a user