basicfirstbutton v1.0.3
Basicfirstbutton
This library was generated with Angular CLI version 17.3.0.
Get Started
Run
npm install basicfirstbuttonoryarn add basicfirstbutton.Import
BasicfirstbuttonDirective, BasicfirstbuttonComponentin app.module.ts as below:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BasicfirstbuttonComponent, BasicfirstbuttonDirective } from 'basicfirstbutton';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
BasicfirstbuttonDirective,
BasicfirstbuttonComponent
// other imports
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }Use basicfirstbutton directive like
<button basicfirstbutton variant="link" size="lg"> <lib-htmbtnicon size="sm" name="envelope"/>Button</button>in app.component.html.if Icon no need please remove .
explore different buttons with different variants: 'destructive', 'outline', 'ghost', 'link', 'secondary', also change size of a button with size: 'sm', 'lg', 'icon'
Code scaffolding
Run ng generate component component-name --project basicfirstbutton to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project basicfirstbutton.
Note: Don't forget to add
--project basicfirstbuttonor else it will be added to the default project in yourangular.jsonfile.
Build
Run ng build basicfirstbutton to build the project. The build artifacts will be stored in the dist/ directory.
Publishing
After building your library with ng build basicfirstbutton, go to the dist folder cd dist/basicfirstbutton and run npm publish.
Running unit tests
Run ng test basicfirstbutton to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.