(host: Tree, compPath: string, tmplInfo: TemplateInfo)
| 66 | } |
| 67 | |
| 68 | function getComponentTemplate(host: Tree, compPath: string, tmplInfo: TemplateInfo): string { |
| 69 | let template = ''; |
| 70 | |
| 71 | if (tmplInfo.templateProp) { |
| 72 | template = tmplInfo.templateProp.getFullText(); |
| 73 | } else if (tmplInfo.templateUrlProp) { |
| 74 | const templateUrl = (tmplInfo.templateUrlProp.initializer as ts.StringLiteral).text; |
| 75 | const dir = dirname(compPath); |
| 76 | const templatePath = join(dir, templateUrl); |
| 77 | try { |
| 78 | template = host.readText(templatePath); |
| 79 | } catch {} |
| 80 | } |
| 81 | |
| 82 | return template; |
| 83 | } |
| 84 | |
| 85 | function getBootstrapComponentPath(host: Tree, mainPath: string): string { |
| 86 | let bootstrappingFilePath: string; |
no test coverage detected