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

Function component

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

Source from the content-addressed store, hash-verified

121});
122
123const component = (name: string, selector: string, template: string, body = '') => `import { Component } from '@angular/core';
124import { Router } from '@angular/router';
125@Component({
126 selector: '${selector}',
127 ${template.startsWith('./') ? `templateUrl: '${template}'` : `template: \`${template}\``},
128})
129export class ${name} {
130 constructor(private readonly router: Router) {}
131${body}
132}
133`;
134
135describe('an Angular app, indexed', () => {
136 let cg: CodeGraph;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected