0.1.1 • Published 5 years ago
tab7index-lib v0.1.1
Installation
npm i tab7index-lib
API
import { Tab7indexLibModule } from 'tab7index-lib'
selector: tab7
Usage
1) Register the Tab7indexLibModule
in your app module.
import { Tab7indexLibModule } from 'tab7index-lib'
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule, MatInputModule } from '@angular/material';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { Tab7indexLibModule } from 'tab7index-lib';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
ReactiveFormsModule,
MatInputModule,
MatAutocompleteModule,
HttpClientModule,
Tab7indexLibModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
2) Use the directive (Tab7indexLibModule)
in your component.
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { AppService } from './app.service';
@Component({
selector: 'app',
template: `<h3>Tab7indexLibModule demo app using Angular Material</h3>
<div>
<mat-form-field>
<input matInput tab7
formControlName="country" >
</mat-form-field>
<input tab7>
<input type="radio" tab7>
<input type="checkbox" tab7>
</div>
`,
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
constructor() {}
ngOnInit() {
}
}