bao-tran-angular
TypeScript icon, indicating that this package has built-in type declarations

0.0.26 • Public • Published

Installation instructions

Install bao-tran-angular from npm:

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:

<button type="button" class="btn btn-primary"
  tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
  Simple demo
</button>

You will need bootstrap styles:

  • Bootstrap 3
<!-- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  • Bootstrap 4
<!--- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">

Setting up the bootstrap version manually

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. AppComponent):

import { setTheme } from 'bao-tran-angular/utils';

@Component({...})
export class AppComponent {
  constructor() {
    setTheme('bs3'); // or 'bs4'
    ...
  }
}

Package Sidebar

Install

npm i bao-tran-angular

Weekly Downloads

2

Version

0.0.26

License

none

Unpacked Size

14.1 MB

Total Files

1133

Last publish

Collaborators

  • kitchen-computer