feat(dart/transform): Add onInit and onCheck hooks in Dart
Implement `onInit` and `onCheck` hooks in pre-generated Dart change
detectors. This mirrors the changes made to the JIT change detector in
c39c8ebcd0
.
This commit is contained in:
@ -236,7 +236,7 @@ export class ChangeDetectorJITGenerator {
|
||||
} else {
|
||||
rec = this._genReferenceCheck(r);
|
||||
}
|
||||
return `${rec}${this._genLastInDirective(r)}`;
|
||||
return `${rec}${this._maybeGenLastInDirective(r)}`;
|
||||
}
|
||||
|
||||
_genDirectiveLifecycle(r: ProtoRecord) {
|
||||
@ -419,7 +419,7 @@ export class ChangeDetectorJITGenerator {
|
||||
`;
|
||||
}
|
||||
|
||||
_genLastInDirective(r: ProtoRecord): string {
|
||||
_maybeGenLastInDirective(r: ProtoRecord): string {
|
||||
if (!r.lastInDirective) return "";
|
||||
return `
|
||||
${CHANGES_LOCAL} = null;
|
||||
|
Reference in New Issue
Block a user