Created
November 15, 2023 15:22
-
-
Save mattkenefick/51fceb6f512b862f0a418389b779e2df to your computer and use it in GitHub Desktop.
Angular template
This file contains 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
<section class="view-${input.filename}"> | |
My Template | |
</section> |
This file contains 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
:host { | |
// Not implemented | |
} |
This file contains 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
${-- | |
variables.capitalFilename = variables.input_filename.charAt(0).toUpperCase() + variables.input_filename.slice(1) | |
--}import { ComponentFixture, TestBed } from '@angular/core/testing'; | |
import { ${{ variables.capitalFilename }}Component } from './${input.filename}.component'; | |
describe('${{ variables.capitalFilename }}Component', () => { | |
let component: ${{ variables.capitalFilename }}Component; | |
let fixture: ComponentFixture<${{ variables.capitalFilename }}Component>; | |
beforeEach(async () => { | |
await TestBed.configureTestingModule({ declarations: [${{ variables.capitalFilename }}Component] }).compileComponents(); | |
fixture = TestBed.createComponent(${{ variables.capitalFilename }}Component); | |
component = fixture.componentInstance; | |
fixture.detectChanges(); | |
}); | |
it('should create', () => { | |
expect(component).toBeTruthy(); | |
}); | |
}); |
This file contains 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
${-- | |
variables.capitalFilename = variables.input_filename.charAt(0).toUpperCase() + variables.input_filename.slice(1) | |
--}import { Component, EventEmitter, Input, Output } from '@angular/core'; | |
import ViewBase from '@/view/base'; | |
/** | |
* @author ${package.author} | |
* @package ${{ outputDirectoryRelative.split('src/')[1] }} | |
* @project ${package.name} | |
*/ | |
@Component({ | |
host: { class: 'view view-${input.filename}' }, | |
selector: 'view-${input.filename}', | |
styleUrls: ['./${input.filename}.component.scss'], | |
templateUrl: './${input.filename}.component.html', | |
}) | |
export default class View${{ variables.capitalFilename }} extends ViewBase { | |
// Not implemented | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment