Package Exports
- @ngx-popovers/core
- @ngx-popovers/core/package.json
Readme
core
This library was generated with Nx and floating-ui for Angular apps.
Note
I strongly recommend not using this library until its stable version is released.
This package is a major dependency for other packages:
Usage
FloatingService
Before using you should add this service to providers list
import { FloatingService } from '@ngx-popovers/core';
@Component({
standalone: true,
providers: [FloatingService],
template: '',
styles: ''
})
export class AppComponent {
}
(method) computePosition
The computePosition method is a proxy for computePosition from floating-ui
floatingService = inject(FloatingService);
this.floatingService.computePosition(trigger, floating);
You also can import all types and methods of floating-ui from this package
import {
Derivable,
FlipOptions,
OffsetOptions,
Placement,
ShiftOptions
} from '@ngx-popovers/core';
Portal
The <ngx-portal/>
component displays the content on the body.
<ngx-portal>
<p>It will be displayed as the last child of the body</p>
</ngx-portal>
This component is required to display tooltips correctly without overlapping with other elements on the page.
It uses here: