This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
Change detection should report the previous value #1265
Open
Description
The following code
var ast = astParser('a.b.c');
var b = {'c': 1};
var a = {'b': b};
context['a'] = a;
watchGrp.watch(ast, (v, p) => print('c: $p -> $v'));
print('** Init');
watchGrp.detectChanges();
b['c'] = 2;
print('** Change c');
watchGrp.detectChanges();
print('** Change b, c');
a['b'] = {'c': 4};
b['c'] = 3;
watchGrp.detectChanges();
results in:
** Init
c: null -> 1
** Change c
c: 1 -> 2
** Change b, c
c: 3 -> 4
whereas it should result in
** Init
c: null -> 1
** Change c
c: 1 -> 2
** Change b, c
c: 2 -> 4
relates to #1113
Metadata
Metadata
Assignees
Labels
No labels