This project is a collection of bootstrap components (bcomponents) as angular 2 components. Instead of having to write nested markup for a bootstrap heading, you would use <bc-heading [title]="'My awesome heading'"></bc-heading>
.
To install with npm run the following command:
npm i ng-bcomponents
For SystemJS add this to your systemjs.config.js file:
var map = {
// Your other libraries here
'ng-bcomponents': 'node_modules/ng-bcomponents'
};
var packages = {
// Your other libraries here
'ng-bcomponents': { main: 'index.js', defaultExtension: 'js' }
};
var config = {
map: map,
packages: packages,
defaultJSExtensions: true
};
System.config(config);
Import the NgBComponentsModule
into your app module and add it to your app module's imports
import {NgBComponentsModule} from 'ng-bcomponents';
import {BComponent} from 'ng-bcomponents';
@NgModule({
imports: [NgBComponentsModule]
})
export class AppModule {
constructor() {
//Uncomment to disable auto identifiers
//BComponent.disableAutoIdentifier();
}
}