1.0.2 • Published 6 years ago
tcm-fund-module v1.0.2
TCM Core Library
Installation
To install this library, run:
$ npm install tcm-fund-module --save
Consuming your library
vipuldhaigude@gmail npm user - tcmreg password - tcm2619
Once you have published your library to npm, you can import your library in any Angular application by running:
$ npm install tcm-fund-module --save
and then from your Angular AppModule
module :
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { FUNDMODULE, FUND_HOMECOMPONENT } from 'tcm-fund-module';
@NgModule({
declarations: [
],
imports: [
FUNDMODULE
],
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 -->
export const MAIN_ROUTES: Route[] = [
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'FUND', component: FUND_HOMECOMPONENT }
]
Naming com´nventions. 1. Always name your component prefixed by module name, separated by underscore in capital letters. ex: FUND_HOMECOMPONENT
Always name your services prefixed by module name, separated by underscore in capital letters. ex: FUND_SERVICE
Route definations should follow the same rule. ex:{ path: 'FUND_OVERVIEW', component: FUND_OVERVIEWCOMPONENT }
License
MIT � vipul