refactor: Remove isDart from public API
BREAKING CHANGE: - `IS_DARTIUM` no longer exported
This commit is contained in:
@ -7,8 +7,7 @@ import {
|
||||
BaseException,
|
||||
assertionsEnabled,
|
||||
print,
|
||||
stringify,
|
||||
isDart
|
||||
stringify
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {BrowserDomAdapter} from 'angular2/src/dom/browser_adapter';
|
||||
import {DOM} from 'angular2/src/dom/dom_adapter';
|
||||
@ -76,6 +75,7 @@ import {
|
||||
import {internalView} from 'angular2/src/core/compiler/view_ref';
|
||||
import {APP_COMPONENT_REF_PROMISE, APP_COMPONENT} from './application_tokens';
|
||||
import {wtfInit} from '../profile/wtf_init';
|
||||
import {EXCEPTION_BINDING} from './platform_bindings';
|
||||
|
||||
var _rootInjector: Injector;
|
||||
|
||||
@ -146,7 +146,7 @@ function _injectorBindings(appComponentType): List<Type | Binding | List<any>> {
|
||||
PipeResolver,
|
||||
Parser,
|
||||
Lexer,
|
||||
bind(ExceptionHandler).toFactory(() => new ExceptionHandler(DOM, isDart ? false : true), []),
|
||||
EXCEPTION_BINDING,
|
||||
bind(XHR).toValue(new XHRImpl()),
|
||||
ComponentUrlMapper,
|
||||
UrlResolver,
|
||||
|
10
modules/angular2/src/core/platform_bindings.dart
Normal file
10
modules/angular2/src/core/platform_bindings.dart
Normal file
@ -0,0 +1,10 @@
|
||||
library angular2.platform_bindings;
|
||||
|
||||
|
||||
import 'package:angular2/di.dart';
|
||||
import './exception_handler.dart';
|
||||
import 'package:angular2/src/dom/dom_adapter.dart';
|
||||
|
||||
exceptionFactory() => new ExceptionHandler(DOM, true);
|
||||
|
||||
const EXCEPTION_BINDING = const Binding(ExceptionHandler, toFactory: exceptionFactory, deps: const []);
|
6
modules/angular2/src/core/platform_bindings.ts
Normal file
6
modules/angular2/src/core/platform_bindings.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import {bind} from 'angular2/di';
|
||||
import {ExceptionHandler} from './exception_handler';
|
||||
import {DOM} from 'angular2/src/dom/dom_adapter';
|
||||
|
||||
export const EXCEPTION_BINDING =
|
||||
bind(ExceptionHandler).toFactory(() => new ExceptionHandler(DOM, false), []);
|
Reference in New Issue
Block a user