Issue 1:
I'm submitting a ...

[ ] bug report => search github for a similar issue or PR before submitting

[x] feature request

[ ] support request => Please do not submit support request here, instead see

Current behavior

Property bindings check for changes by comparing object reference. And there is no way of having the change check compare a subproperty object reference instead of the root object reference.

Expected behavior

I can specify either a subproperty object reference to check instead, or a subproperty primitive to check by value.

What is the motivation / use case for changing the behavior?

The doCheck hook is often times more complex than is necessary for simply specifying a more specific field to check in the change tracking process.

I would think it would be very useful, and not entirely outside of the spirit of the framework, to be able to do something such as [hero]="hero track by hero.stats". So that, in the parent component, I can overwrite the hero objects stats field and have the new object propagate down to the child without having to rewrite all other properties on the hero. Ones that don't really change, like maybe id or name.

I'm primarily an angular 1 developer, and I made this feature request over there, but they basically said they would only consider it if they knew there would be a comparable feature in ng2.

Reference: angular/angular.js#15647

Issue 2:
I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Angular checks if bounded value has changed by identity

Expected behavior

We need a way to inform change detection mechanism that bounded object has changed.

Obvious way would be using observables as inputs, but it has some drawbacks:

we must change existing code so it expects observable as input (not always possible)

only possible when binding to component/directive input - cannot use with {{ }}

it adds more boilerplate code

I suggest that angular have a special type of observable, let's say instance of SpecialObservable class for now.

When it's passed as input, angular would not detect changes by identity, but it will subscribe to it and pass values from this observable is input.

Why not using async pipe then?

Concept is very similar, but everything returned by async pipe is still subject to change detection. If observable emits two the same objects, second won't trigger change in input.

What is the motivation / use case for changing the behavior?

We can create a sophisticated way of detecting changes in input suited for specific use.

For example, it would be possible to implement one time binding like this:

@Pipe({ name: 'once', pure: false })
export class OncePipe implements PipeTransform {
private completed = false;
private subject= new Subject<any>();
private observable = new SpecialObservable(this.subject);
transform(value: any) {
if (!this.completed) {
this.completed = true;
this.subject.next(value);
this.subject.complete();
}
return observable;
}
}

usage: {{ value | once }}

Also, we can have change detection in mutable objects.