feat(render/dom_renderer): DocumentToken use OpaqueToken

BREAKING CHANGE:

No longer a `const` string. Now a const OpaqueToken
This commit is contained in:
gdi2290 2015-05-29 14:28:17 -07:00 committed by Tobias Bosch
parent ef27919f7f
commit db7a1f19ba
1 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,11 @@
import {Inject, Injectable} from 'angular2/di'; import {Inject, Injectable, OpaqueToken} from 'angular2/di';
import {isPresent, isBlank, BaseException, RegExpWrapper} from 'angular2/src/facade/lang'; import {
isPresent,
isBlank,
BaseException,
RegExpWrapper,
CONST_EXPR
} from 'angular2/src/facade/lang';
import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection'; import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection';
import {DOM} from 'angular2/src/dom/dom_adapter'; import {DOM} from 'angular2/src/dom/dom_adapter';
@ -15,9 +21,7 @@ import {NG_BINDING_CLASS_SELECTOR, NG_BINDING_CLASS} from './util';
import {Renderer, RenderProtoViewRef, RenderViewRef} from '../api'; import {Renderer, RenderProtoViewRef, RenderViewRef} from '../api';
// TODO(tbosch): use an OpaqueToken here once our transpiler supports export const DOCUMENT_TOKEN = CONST_EXPR(new OpaqueToken('DocumentToken'));
// const expressions!
export const DOCUMENT_TOKEN = 'DocumentToken';
@Injectable() @Injectable()
export class DomRenderer extends Renderer { export class DomRenderer extends Renderer {