fix(change_detect): Sort DirectiveMetadata
properties during processing
The Angular 2 render compiler can get out of sync between its transformer execution and its runtime execution, leading to incorrect change detectors with out-of-order property values. Stable sorting solves this problem (temporarily).
This commit is contained in:
@ -158,6 +158,16 @@ export class StringWrapper {
|
||||
}
|
||||
|
||||
static contains(s: string, substr: string): boolean { return s.indexOf(substr) != -1; }
|
||||
|
||||
static compare(a: string, b: string): int {
|
||||
if (a < b) {
|
||||
return -1;
|
||||
} else if (a > b) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class StringJoiner {
|
||||
|
Reference in New Issue
Block a user