ngx-simple-popper
v1.0.1
Published
popper for angular.
Downloads
35
Maintainers
Readme
About The Project
Popper wrap for Angular
Getting Started
Prerequisites
- npm
npm i @popperjs/core --save npm i ngx-simple-popper --save
Installation
- Enter your project directory
- Install NPM packages
npm i @popperjs/core --save npm i ngx-simple-popper --save
Usage
Load the module:
import {NgxSimplePopperModule} from "ngx-simple-popper";
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
NgxSimplePopperModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
And use in template:
<div class="container">
<button [popperFor]="popperContent"
[offset]="[0, 10]"
(mouseenter)="popperContent.state = 'show'"
(mouseleave)="popperContent.state = 'hide'"
placement="bottom">
Hello
</button>
<popper-container #popperContent>
<div class="">
Hello
</div>
</popper-container>
</div>
Contributing
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.