You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
generators: allow dash - in selector before a number #25164
We use jira. Tickets always follow the schema <PROJECT>-<TICKETNUMBER> so e.g. Task-123. If we do an a/b test, we like to postfix the files that mirror the control group with the ticket, so e.g feature-task-123.component.ts. But the cli right now doesn't allow this.
See ng g c TodoItemTask123 neither the files nor the selector have the -. So task-123 is actually task123:
So what I'd like to do would be one of these:
ng g c TodoItemTask-123
ng g c TodoItemTask123 --selector app-todo-item-task-123
but both commands get rejected with Selector "app-todo-item-task-123" is invalid:
Describe the solution you'd like
I'd like if ng g c TodoItemTask-123 was allowed and generates files like:
todo-item-task-123.component.ts
^ having the dash
Describe alternatives you've considered
Renaming all the files and updating the NgModule by hand afterwards.
Activity
sumitparakh commentedon May 9, 2023
Hi @alan-agius4. I would like to take this up
alan-agius4 commentedon May 9, 2023
@sumitparakh go for it.
fix(@angular/cli): allow dash in selector before a number
fix(@angular/cli): allow dash in selector before a number
fix(@angular/cli): allow dash in selector before a number
fix(@angular/cli): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
fix(@schematics/angular): allow dash in selector before a number
angular-automatic-lock-bot commentedon Nov 26, 2023
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.