Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.
/ ng-bcomponents Public archive

Bootstrap components as Angular 2 components

License

Notifications You must be signed in to change notification settings

cpamp/ng-bcomponents

Repository files navigation

ng-bcomponents

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>.

Installation and Usage

npm

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);

Usage

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();
    }
}