To install this library, run:
$ npm install xplain-common --save
$ npm install xplain-common
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { SampleModule, HelloWorldModule, AutoCompleteModule } from 'xplain-common';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
SampleModule,
HelloWorldModule,
AutoCompleteModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Once your library is imported, you can use its components, directives and pipes in your Angular application:
<!-- You can now use your library component in app.component.html -->
<h1>
{{title}}
</h1>
<sampleComponent></sampleComponent>
<helloWorldComponent></helloWorldComponent>
<xplain-autocomplete [description]="autoCmplDesc" [options]="autoCmplOptions" [(selectedOption)]="selectedOption"></xplain-autocomplete>
MIT © María Pilar Pérez Quílez