This change moves many APIs to the angular2/core export.
This change also automatically adds FORM_BINDINGS in
the application root injector.
BREAKING CHANGE:
Many dependencies that were previously exported from specific
APIs are now exported from angular2/core. Affected exports, which
should now be included from angular2/core include:
angular2/forms
angular2/di
angular2/directives
angular2/change_detection
angular2/bootstrap (except for dart users)
angular2/render
angular2/metadata
angular2/debug
angular2/pipes
Closes #3977
29 lines
867 B
TypeScript
29 lines
867 B
TypeScript
/// <reference path="../angular2/typings/node/node.d.ts" />
|
|
|
|
import {bind} from 'angular2/src/core/di';
|
|
import {Options} from './common';
|
|
|
|
export * from './common';
|
|
export {SeleniumWebDriverAdapter} from './src/webdriver/selenium_webdriver_adapter';
|
|
|
|
var fs = require('fs');
|
|
|
|
// TODO(tbosch): right now we bind the `writeFile` method
|
|
// in benchpres/benchpress.es6. This does not work for Dart,
|
|
// find another way...
|
|
// Note: Can't do the `require` call in a facade as it can't be loaded into the browser
|
|
// for our unit tests via karma.
|
|
Options.DEFAULT_BINDINGS.push(bind(Options.WRITE_FILE).toValue(writeFile));
|
|
|
|
function writeFile(filename, content): Promise<any> {
|
|
return new Promise(function(resolve, reject) {
|
|
fs.writeFile(filename, content, (error) => {
|
|
if (error) {
|
|
reject(error);
|
|
} else {
|
|
resolve();
|
|
}
|
|
});
|
|
})
|
|
}
|