refactor(change_detect): Share more codegen logic

Move more logic in our codegen into a shared util which is called by the
Jit & Prege change detector code.
This commit is contained in:
Tim Blasi
2015-08-03 14:10:07 -07:00
parent 392de4af67
commit c58b0ff787
6 changed files with 148 additions and 173 deletions

View File

@ -51,7 +51,7 @@ class _MyComponent_ChangeDetector0
}
if (c_myNum0) {
l_interpolate1 =
"Salad: " "${l_myNum0 == null ? "" : l_myNum0}" " is awesome";
"${"Salad: "}${_gen.ChangeDetectionUtil.s(l_myNum0)}${" is awesome"}";
if (_gen.looseNotIdentical(l_interpolate1, this.interpolate1)) {
if (throwOnChange) {
this.throwOnChangeError(this.interpolate1, l_interpolate1);