README
Alert
Reusable alert component created with Bootstrap 5+ and Angular 11+
New Features
Added Angular 12 Support
Technologies
- Angular 11+
- Bootstrap 5+
API
List of selectors that can be used to select the component
Selector |
---|
alert,lib-alert |
Properties
Property | Description | Type | Default Value |
---|---|---|---|
dismissible | If set, displays an inline "Close" button | boolean | false |
dismissOnTimeout | If set, dismisses the alert after Dismiss Timeout | boolean | true |
dismissTimeout | Number in milliseconds, after which alert will be closed | string or number | 5000 |
isOpen | Is alert visible | boolean | false |
type | Alert type. Provides one of four bootstrap supported contextual classes: success, info, warning and danger | string | info |
Test project locally in another repo
Run the following steps inside library folder
- Install all dependencies
$ npm install
- Build the project
$ npm run build
- Link the project
$ npm link dist/alert
Inside the Test/Actual project, remove the dependency and link local dependency
- Install dependencies
$ npm install
- Link the library
$ npm link @ngxsmart/alert
- Add property
"preserveSymlinks": true
toangular.json
if not already exists - Start the project
$ npm start
Publish the library to NPM(applies to maintainers)
- Build the library
ng build --configuration production --project=@ngxsmart/alert
- Publish the library to NPM
npm publish dist/alert --access public