diff --git a/src/app/tags/tags.component.ts b/src/app/tags/tags.component.ts index d9ea27bf9f..477b2df388 100644 --- a/src/app/tags/tags.component.ts +++ b/src/app/tags/tags.component.ts @@ -9,7 +9,7 @@ import { KeyValuePair, TagEditAction } from './tags-view/tags-view.component'; import { WithUnsubscribe } from '../utils/mixins/with-unsubscribe'; -export abstract class TagsComponent extends WithUnsubscribe() implements OnInit { +export abstract class TagsComponent extends WithUnsubscribe() implements OnInit { public abstract entity: Taggable; public tags$: BehaviorSubject>; @@ -23,6 +23,7 @@ export abstract class TagsComponent extends WithUnsubscribe() implements OnInit } public ngOnInit(): void { + // todo: remove unsubscribe after migration to ngrx this.tags$.next(this.entity.tags); this.tags$ .takeUntil(this.unsubscribe$) diff --git a/src/app/template/template-tags/template-tags.component.ts b/src/app/template/template-tags/template-tags.component.ts index 156aac340d..52ee757031 100644 --- a/src/app/template/template-tags/template-tags.component.ts +++ b/src/app/template/template-tags/template-tags.component.ts @@ -4,15 +4,16 @@ import { DialogService } from '../../dialog/dialog-module/dialog.service'; import { Tag } from '../../shared/models'; import { TagService } from '../../shared/services'; import { TagsComponent } from '../../tags/tags.component'; -import { BaseTemplateModel, IsoService, TemplateService } from '../shared'; +import { IsoService, TemplateService } from '../shared'; import { BaseTemplateService } from '../shared/base-template.service'; +import { BaseTemplateModel } from '../shared/base-template.model'; @Component({ selector: 'cs-template-tags', templateUrl: 'template-tags.component.html' }) -export class TemplateTagsComponent extends TagsComponent { +export class TemplateTagsComponent extends TagsComponent { @Input() public entity: BaseTemplateModel; constructor( diff --git a/src/app/vm/vm-tags/vm-tags.component.ts b/src/app/vm/vm-tags/vm-tags.component.ts index 5fd20fd569..d0a5fb2979 100644 --- a/src/app/vm/vm-tags/vm-tags.component.ts +++ b/src/app/vm/vm-tags/vm-tags.component.ts @@ -12,7 +12,7 @@ import { VirtualMachine } from '../shared/vm.model'; selector: 'cs-vm-tags', templateUrl: 'vm-tags.component.html' }) -export class VmTagsComponent extends TagsComponent implements OnInit { +export class VmTagsComponent extends TagsComponent implements OnInit { @Input() public entity: VirtualMachine; constructor( @@ -24,6 +24,7 @@ export class VmTagsComponent extends TagsComponent implements OnInit { } public ngOnInit(): void { + // todo: remove unsubscribe after migration to ngrx super.ngOnInit(); this.tags$ .takeUntil(this.unsubscribe$)