Closes #3605 BREAKING CHANGE: - we don't mark an element as bound any more if it only contains text bindings E.g. <div>{{hello}}</div> This changes the indices when using `DebugElement.componentViewChildren` / `DebugElement.children`. - `@Directive.compileChildren` was removed, `ng-non-bindable` is now builtin and not a directive any more - angular no more adds the `ng-binding` class to elements with bindings - directives are now ordered as they are listed in the View.directives regarding change detection. Previously they had an undefined order. - the `Renderer` interface has new methods `createProtoView` and `registerComponentTemplate`. See `DomRenderer` for default implementations. - reprojection with `ng-content` is now all or nothing per `ng-content` element - angular2 transformer can't be used in tests that modify directive metadata. Use `angular2/src/transform/inliner_for_test` transformer instead.
46 lines
1.9 KiB
TypeScript
46 lines
1.9 KiB
TypeScript
export {TemplateCompiler} from './template_compiler';
|
|
export {
|
|
CompileDirectiveMetadata,
|
|
CompileTypeMetadata,
|
|
CompileTemplateMetadata
|
|
} from './directive_metadata';
|
|
export {SourceModule, SourceWithImports} from './source_module';
|
|
|
|
import {assertionsEnabled, Type} from 'angular2/src/core/facade/lang';
|
|
import {bind, Binding} from 'angular2/src/core/di';
|
|
import {TemplateParser} from 'angular2/src/compiler/template_parser';
|
|
import {HtmlParser} from 'angular2/src/compiler/html_parser';
|
|
import {TemplateNormalizer} from 'angular2/src/compiler/template_normalizer';
|
|
import {RuntimeMetadataResolver} from 'angular2/src/compiler/runtime_metadata';
|
|
import {ChangeDetectionCompiler} from 'angular2/src/compiler/change_detector_compiler';
|
|
import {StyleCompiler} from 'angular2/src/compiler/style_compiler';
|
|
import {CommandCompiler} from 'angular2/src/compiler/command_compiler';
|
|
import {TemplateCompiler} from 'angular2/src/compiler/template_compiler';
|
|
import {ChangeDetectorGenConfig} from 'angular2/src/core/change_detection/change_detection';
|
|
import {Compiler} from 'angular2/src/core/compiler/compiler';
|
|
import {RuntimeCompiler} from 'angular2/src/compiler/runtime_compiler';
|
|
import {ElementSchemaRegistry} from 'angular2/src/core/render/dom/schema/element_schema_registry';
|
|
import {
|
|
DomElementSchemaRegistry
|
|
} from 'angular2/src/core/render/dom/schema/dom_element_schema_registry';
|
|
|
|
export function compilerBindings(): Array<Type | Binding | any[]> {
|
|
return [
|
|
HtmlParser,
|
|
TemplateParser,
|
|
TemplateNormalizer,
|
|
RuntimeMetadataResolver,
|
|
StyleCompiler,
|
|
CommandCompiler,
|
|
ChangeDetectionCompiler,
|
|
bind(ChangeDetectorGenConfig)
|
|
.toValue(
|
|
new ChangeDetectorGenConfig(assertionsEnabled(), assertionsEnabled(), false, true)),
|
|
TemplateCompiler,
|
|
RuntimeCompiler,
|
|
bind(Compiler).toAlias(RuntimeCompiler),
|
|
DomElementSchemaRegistry,
|
|
bind(ElementSchemaRegistry).toAlias(DomElementSchemaRegistry)
|
|
];
|
|
}
|