-
Notifications
You must be signed in to change notification settings - Fork 6.7k
/
template-migrator.ts
39 lines (34 loc) · 1.09 KB
/
template-migrator.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as compiler from '@angular/compiler';
export abstract class TemplateMigrator {
/** The name of the component that this migration handles. */
abstract component: string;
/** The tag name to be updated in the template. */
abstract tagName: string;
/**
* Updates the start tag of the given node in the html template.
*
* @param template The html content to be updated.
* @param node The Element node to be updated.
* @returns The updated template.
*/
updateEndTag(template: string, node: compiler.TmplAstElement): string {
return template;
}
/**
* Updates the end tag of the given node in the html template.
*
* @param template The html content to be updated.
* @param node The Element node to be updated.
* @returns The updated template.
*/
updateStartTag(template: string, node: compiler.TmplAstElement): string {
return template;
}
}