MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / component

Function component

__tests__/angular-router.test.ts:202–212  ·  view source on GitHub ↗
(name: string, selector: string, template: string, body = '')

Source from the content-addressed store, hash-verified

200});
201
202const component = (name: string, selector: string, template: string, body = '') => `import { Component } from '@angular/core';
203import { Router } from '@angular/router';
204@Component({
205 selector: '${selector}',
206 ${template.startsWith('./') ? `templateUrl: '${template}'` : `template: \`${template}\``},
207})
208export class ${name} {
209 constructor(private readonly router: Router) {}
210${body}
211}
212`;
213
214describe('an Angular app, indexed', () => {
215 let cg: CodeGraph;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected