Angular 角度变化检测策略.OnPush未在输入变化时触发

Angular 角度变化检测策略.OnPush未在输入变化时触发,angular,angular2-changedetection,Angular,Angular2 Changedetection,我有一个简单的组件 @Component({ selector: 'app-person-table', templateUrl: './person-table.component.html', styleUrls: ['./person-table.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush }) export class PersonTableComponent impl

我有一个简单的组件

@Component({
    selector: 'app-person-table',
    templateUrl: './person-table.component.html',
    styleUrls: ['./person-table.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class PersonTableComponent implements OnInit, OnDestroy {

    @Input() result: PageResult<Person>;

    public personsSub: Subscription;

    constructor(public personsStore: PersonsStore, public routerStore: RouterStore, public stringService: StringService) {
        this.personsSub = this.personsStore.getResult().subscribe(result => {
            this.result = result;
        });
    }

    ngOnInit() {
    }

    ngOnDestroy() {
        this.personsSub.unsubscribe();
    }

    goToPerson(person: Person) {
        if (person) {
            this.routerStore.go(['persons', person.id]);
        }
    }
}
@组件({
选择器:“应用程序人员表”,
templateUrl:'./person表.component.html',
styleUrls:['./个人表.component.scss'],
changeDetection:ChangeDetectionStrategy.OnPush
})
导出类PersonTableComponent实现OnInit、OnDestroy{
@Input()结果:PageResult;
公众人士分:认购;;
构造函数(公共PersonStore:PersonStore、公共routerStore:routerStore、公共stringService:stringService){
this.personsSub=this.personsStore.getResult().subscribe(结果=>{
this.result=结果;
});
}
恩戈尼尼特(){
}
恩贡德斯特罗(){
this.personsub.unsubscribe();
}
goToPerson(人:人){
如果(人){
this.routerStore.go(['persons',person.id]);
}
}
}
然后,在我的模板中,我只需

<div class="table" *ngIf="result?.data && result.data.length > 0">
    <div class="row header">
        Header
    </div>
    <div class="row filters">
        Filter
    </div>
    <ng-template ngFor let-row [ngForOf]="result.data" let-i="index">
        <div class="row data" >
            Row #{{ i }}
        </div>
    </ng-template>
</div>

标题
滤器
第#{i}行
最初的结果是
null
,但随后它会收到一个真实的
PageResult
对象。如果我注释掉
changeDetection:ChangeDetectionStrategy.OnPush
,则模板呈现良好。如果我将
changeDetection:ChangeDetectionStrategy.OnPush保持活动状态,则模板为空


有人能向我解释为什么更改
结果
变量不会触发更改检测机制吗?

更改应该来自父组件推送方式:仅当父组件更改其中一个输入的值时触发更改检测,即将不同的值作为输入传递给组件。这里不是这样,结果不应该用输入修饰,因为它实际上不是一个。