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:
Tim Blasi
2015-07-20 13:37:50 -07:00
parent 4c8ea12903
commit b2a0be87e8
6 changed files with 33 additions and 9 deletions

View File

@ -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 {