Mercurial > hg > ugly-duckling
changeset 232:77ada2e07997
Setup feed for OnPush strategy and pass single items to children
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Mon, 24 Apr 2017 16:39:32 +0100 |
parents | 0249ee049353 |
children | bd2f5769e7fa |
files | src/app/notebook-feed/notebook-feed.component.html src/app/notebook-feed/notebook-feed.component.ts |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/app/notebook-feed/notebook-feed.component.html Mon Apr 24 16:20:23 2017 +0100 +++ b/src/app/notebook-feed/notebook-feed.component.html Mon Apr 24 16:39:32 2017 +0100 @@ -3,12 +3,8 @@ <div [class.break]="item.isRoot"> <ugly-analysis-item [timeline]="item.hasSharedTimeline ? sharedTimeline : undefined" - [title]="item.title" - [description]="item.description" [isActive]="rootAudioUri === item.rootAudioUri" - [isRoot]="item.isRoot" - [id]="item.id" - [progress]="item.progress" + [item]="item" ></ugly-analysis-item> </div> </template>
--- a/src/app/notebook-feed/notebook-feed.component.ts Mon Apr 24 16:20:23 2017 +0100 +++ b/src/app/notebook-feed/notebook-feed.component.ts Mon Apr 24 16:39:32 2017 +0100 @@ -1,14 +1,19 @@ /** * Created by lucast on 21/03/2017. */ -import {Component, Input} from "@angular/core"; +import { + ChangeDetectionStrategy, + Component, + Input +} from "@angular/core"; import Waves from 'waves-ui'; import {AnalysisItem} from "../analysis-item/analysis-item.component"; @Component({ selector: 'ugly-notebook-feed', templateUrl: './notebook-feed.component.html', - styleUrls: ['./notebook-feed.component.css'] + styleUrls: ['./notebook-feed.component.css'], + changeDetection: ChangeDetectionStrategy.OnPush }) export class NotebookFeedComponent { sharedTimeline: Timeline; @@ -29,6 +34,5 @@ constructor() { this.sharedTimeline = new Waves.core.Timeline(); - this.analyses = []; } }