Fix caching schemas with discriminator

This commit is contained in:
Roman Hotsiy 2016-03-27 00:37:56 +02:00
parent 2cbb516059
commit 8b30653fb0

View File

@ -55,7 +55,8 @@ export default class JsonSchemaLazy {
let $element = compRef.location.nativeElement;
// skip caching view with tabs inside (discriminator) as it needs attached controller
if ($element.querySelector('tabs')) {
// FIXME: get rid of dependency on selector
if ($element.querySelector('.discriminator-wrap')) {
this.dcl.loadNextToLocation(JsonSchema, this.elementRef).then((compRef) => {
compRef.instance.pointer = this.pointer;
compRef.hostView.changeDetectorRef.markForCheck();