Last active
July 17, 2024 12:37
-
-
Save alonbalbuena/40fb459df1c8ad61ec97c2b535d3ed8e to your computer and use it in GitHub Desktop.
File Template for Angular components in Webstorm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ChangeDetectionStrategy, Component } from '@angular/core'; | |
#set($componentName = "") | |
#foreach($str in $NAME.split("-")) | |
#set($str = $str.substring(0,1).toUpperCase()+$str.substring(1)) | |
#set($componentName = $componentName + $str) | |
#end | |
@Component({ | |
selector: 'app-${NAME}', | |
templateUrl: './${NAME}.component.html', | |
styleUrl: './${NAME}.component.scss', | |
changeDetection: ChangeDetectionStrategy.OnPush, | |
standalone: true, | |
}) | |
export class ${componentName}Component { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now when you create a file of angular


It creates the full folder.