X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fheader%2Fsuggestions.component.ts;h=ee3ef73c2c8f617e37c662b2a41f7b053571ff29;hb=fad0759cab414731060733df74d4244a13b543e1;hp=122c09388c5ebee01f6e0ded88b02f97133af85e;hpb=6af662a5961b48ac12682df2b8b971060a2cc67d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/header/suggestions.component.ts b/client/src/app/header/suggestions.component.ts index 122c09388..ee3ef73c2 100644 --- a/client/src/app/header/suggestions.component.ts +++ b/client/src/app/header/suggestions.component.ts @@ -1,16 +1,10 @@ -import { Input, QueryList, Component, Output, AfterViewInit, EventEmitter, ViewChildren } from '@angular/core' +import { Input, QueryList, Component, Output, AfterViewInit, EventEmitter, ViewChildren, ChangeDetectionStrategy } from '@angular/core' import { SuggestionComponent } from './suggestion.component' @Component({ selector: 'my-suggestions', - template: ` - - ` + templateUrl: './suggestions.component.html', + changeDetection: ChangeDetectionStrategy.OnPush }) export class SuggestionsComponent implements AfterViewInit { @Input() results: any[] @@ -19,9 +13,8 @@ export class SuggestionsComponent implements AfterViewInit { @Output() init = new EventEmitter() ngAfterViewInit () { - this.init.emit({ items: this.listItems }) this.listItems.changes.subscribe( - val => this.init.emit({ items: this.listItems }) + _ => this.init.emit({ items: this.listItems }) ) }