MCPcopy Create free account
hub / github.com/angular/components / buildSelector

Function buildSelector

src/cdk/schematics/utils/build-component.ts:124–133  ·  view source on GitHub ↗
(options: ComponentOptions, projectPrefix?: string)

Source from the content-addressed store, hash-verified

122}
123
124function buildSelector(options: ComponentOptions, projectPrefix?: string) {
125 let selector = strings.dasherize(options.name);
126 if (options.prefix) {
127 selector = `${options.prefix}-${selector}`;
128 } else if (options.prefix === undefined && projectPrefix) {
129 selector = `${projectPrefix}-${selector}`;
130 }
131
132 return selector;
133}
134
135/**
136 * Indents the text content with the amount of specified spaces. The spaces will be added after

Callers 1

buildComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected