@quadrel-enterprise-ui/page-leave-handler
v19.0.6
Published
Small library for handling the page leave event
Readme
Quadrel Services - Package for handling the page leave event
Build
Run nx build qd-page-leave-handler to build the project. The build artifacts will be stored in the dist/libs/qd-page-leave-handler directory. Use --configuration production for a production build.
Developement
Run npm run start or nx serve to start the test app for development. The test app integrates all libraries of the monorepo.
Running unit tests
Run nx test qd-page-leave-handler to execute the unit tests.
Release
Releases can be made on a release branch with the following commands:
Run nx release-patch qd-page-leave-handler to create a patch release.
Run nx release-minor qd-page-leave-handler to create a minor release.
Run nx release-major qd-page-leave-handler to create a major release.
Run nx prerelease qd-page-leave-handler to create a beta release.
Run nx premajor qd-page-leave-handler to create a beta major release.
Usage
Install the package
Run npm i -D @quadrel-services/qd-page-leave-handler to add the package in the dependencies.
In your app.module
import { QdPageLeaveHandlerModule } from '@quadrel-services/qd-page-leave-handler';
...
@NgModule({
...
imports: [
...
QdPageLeaveHandlerModule
],
...
})In your template
<qd-page-leave-handler [callBeforeLeaving]="myCallback">
<p>some optional markup</p>
</qd-page-leave-handler>