refactor(views): clean up creating views in place and extract view_hydrator
Major changes: - `compiler.compileRoot(el, type)` -> `compiler.compileInHost(type) + viewHydrator.hydrateHostViewInPlace(el, view)` - move all `hydrate`/`dehydrate` methods out of `View` and `ViewContainer` into a standalone class `view_hydrator` as private methods and provide new public methods dedicated to the individual use cases. Note: This PR does not change the current functionality, only moves it into different places. See design discussion in #1351, in preparation for imperative views.
This commit is contained in:
@ -72,6 +72,7 @@ export function main() {
|
||||
new Parser(new Lexer()), shadowDomStrategy, new TemplateLoader(null, urlResolver)
|
||||
),
|
||||
null,
|
||||
null,
|
||||
shadowDomStrategy
|
||||
);
|
||||
var compiler = new Compiler(
|
||||
@ -81,7 +82,7 @@ export function main() {
|
||||
new ComponentUrlMapper(),
|
||||
urlResolver,
|
||||
renderer,
|
||||
new ProtoViewFactory(dynamicChangeDetection, renderer)
|
||||
new ProtoViewFactory(dynamicChangeDetection)
|
||||
);
|
||||
var templateNoBindings = createTemplateHtml('templateNoBindings', count);
|
||||
var templateWithBindings = createTemplateHtml('templateWithBindings', count);
|
||||
|
Reference in New Issue
Block a user