MCPcopy
hub / github.com/angular/angular / writeSources

Function writeSources

packages/compiler-cli/test/extract_i18n_spec.ts:237–362  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235 });
236
237 function writeSources() {
238 const welcomeMessage = `
239 <!--i18n-->
240 Welcome<!--/i18n-->
241 `;
242 write(
243 'src/basic.html',
244 `<div title="translate me" i18n-title="meaning|desc"></div>
245 <p id="welcomeMessage">${welcomeMessage}</p>`,
246 );
247
248 write(
249 'src/comp1.ts',
250 `
251 import {Component} from '@angular/core';
252
253 @Component({
254 selector: 'basic',
255 templateUrl: './basic.html',
256 standalone: false,
257 })
258 export class BasicCmp1 {}`,
259 );
260
261 write(
262 'src/comp2.ts',
263 `
264 import {Component} from '@angular/core';
265
266 @Component({
267 selector: 'basic2',
268 template: \`<div title="translate me" i18n-title="meaning|desc"></div>
269 <p id="welcomeMessage">${welcomeMessage}</p>\`,
270 standalone: false,
271 })
272 export class BasicCmp2 {}
273 @Component({
274 selector: 'basic4',
275 template: \`<p id="welcomeMessage">${welcomeMessage}</p>\`,
276 standalone: false,
277 })
278 export class BasicCmp4 {}`,
279 );
280
281 write(
282 'src/comp3.ts',
283 `
284 import {Component} from '@angular/core';
285
286 @Component({
287 selector: 'basic3',
288 templateUrl: './basic.html',
289 standalone: false,
290 })
291 export class BasicCmp3 {}`,
292 );
293
294 write(

Callers 1

Calls 1

writeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…