>From what I have read so far, when I use the
OnPush ChangeDetectionStrategy, Angular2 will only dirty check a component
if its input properties change. Does this mean that OnPush *does not*
affect how local properties are checked (properties that are not input
properties)? In other words, in the following example, will the OnPush
strategy not apply to the company and people properties?
*Template*
<h1>{{company.name}}</h1
<person-list [people]="people"></person-list>
*Container Component*
@Component({
...
changeDetection: ChangeDetectionStrategy.OnPush
})
export class PeopleContainerComponent {
company: Company;
people: Person[];
}
In the code above, PeopleContainerComponent is a "container" component, so
it is responsible for fetching the company and people. Thus these
properties cannot be input properties. However, note that people are
actually rendered using a child component (PersonList) - which can very
well make people an input property. So the concern is more about the parent
container component - is it going to be penalized just because its
properties are not input properties?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.