Native Angular Bootstrap Components
npm install bao-tran-angularInstall bao-tran-angular from npm:
``bash`
npm install bao-tran-angular
Add needed package to NgModule imports:
`
import { TooltipModule } from 'bao-tran-angular/tooltip';
@NgModule({
...
imports: [TooltipModule.forRoot(),...]
...
})
`
Add component to your page:
``
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Simple demo
You will need bootstrap styles:
- Bootstrap 3``
- Bootstrap 4``AppComponent$3
Sometimes, your project might contain some library that could interfere with the bootstrap framework, or you might have a customized version of bootstrap. The consequence is that the process of determining bootstrap version might be failed, which can break the UI. In that case, we can still set the bootstrap version manually in the bootstrapping component (i.e. ):`
import { setTheme } from 'bao-tran-angular/utils';
@Component({...})
export class AppComponent {
constructor() {
setTheme('bs3'); // or 'bs4'
...
}
}
``