parent
1b2754dacd
commit
6fcd3709cf
|
@ -180,7 +180,9 @@ export class RenderViewHydrator {
|
||||||
|
|
||||||
_viewContainerDehydrateRecurse(viewContainer) {
|
_viewContainerDehydrateRecurse(viewContainer) {
|
||||||
for (var i=0; i<viewContainer.views.length; i++) {
|
for (var i=0; i<viewContainer.views.length; i++) {
|
||||||
this._viewDehydrateRecurse(viewContainer.views[i]);
|
var view = viewContainer.views[i];
|
||||||
|
this._viewDehydrateRecurse(view);
|
||||||
|
this._viewFactory.returnView(view);
|
||||||
}
|
}
|
||||||
viewContainer.clear();
|
viewContainer.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,6 +223,17 @@ export function main() {
|
||||||
expect(viewFactory.spy('returnView')).toHaveBeenCalledWith(shadowView);
|
expect(viewFactory.spy('returnView')).toHaveBeenCalledWith(shadowView);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should clear views in ViewContainers', () => {
|
||||||
|
createAndHydrate(null, null);
|
||||||
|
var vc = hostView.getOrCreateViewContainer(0);
|
||||||
|
var childView = createEmptyView();
|
||||||
|
vc.insert(childView);
|
||||||
|
|
||||||
|
dehydrate(hostView);
|
||||||
|
|
||||||
|
expect(viewFactory.spy('returnView')).toHaveBeenCalledWith(childView);
|
||||||
|
});
|
||||||
|
|
||||||
it('should clear imperatively added child components', () => {
|
it('should clear imperatively added child components', () => {
|
||||||
var shadowView = createEmptyView();
|
var shadowView = createEmptyView();
|
||||||
createAndHydrate(createProtoView(), shadowView);
|
createAndHydrate(createProtoView(), shadowView);
|
||||||
|
|
Loading…
Reference in New Issue