⚠️ This repository hosts the deprecated version 1 of the library!
This version of the library works with Angular 16 and is not being maintained any more.
The new version - version 2 of the library, that works with Angular 18, is now being maintained and you can find it here: New Repository.
Please consider migrating to the new version to take advantage of the latest features and improvements.
ngx-dynamic-headings is a library to help you generate heading levels in your Angular app dynamically, at run-time. This open-source project welcomes contributions from the community to improve and enhance its functionality. This monorepo contains the library source code as well as a playground web app to test the lib behaviour.
Make sure you have following software installed:
npm install ngx-dynamic-headings --save
Add the NgxDynamicHeadingsModule package to NgModule imports:
import { NgxDynamicHeadingsModule } from 'ngx-dynamic-headings';
@NgModule({
...
imports: [NgxDynamicHeadingsModule,...]
...
})
Then use the
<h1>This is the h1 heading</h1>
<div>
<h>This will generate an h2 heading at runtime</h>
<h>This will generate an h2 heading at runtime</h>
<div>
<h>This will generate h3 heading at runtime</h>
<h>This will generate h3 heading at runtime</h>
</div>
</div>
We welcome contributions from the community. There are several ways you can contribute to ngx-dynamic-headings:
If you encounter any bugs or issues, please search the GitHub Issues to check if it has already been reported. If not, open a new issue, describing the problem and steps to reproduce it.
If you have an idea for a new feature or improvement, please check the existing issues to see if it has been suggested before. If not, feel free to open a new feature request issue, explaining the proposed feature and its benefits.
If you want to contribute code, follow these steps:
main
branch.Improving documentation is valuable for the project. If you find any inaccuracies or have suggestions for improvements, please submit a pull request with your proposed changes.
Go to ngx-dynamic-heading docs
We encourage contributors to write tests for new features and bug fixes. Make sure all tests pass before submitting your contribution.
All contributions are reviewed by the maintainers before merging. Be patient during the review process and be prepared to address any feedback or suggestions. Once your pull request is approved, it will be merged into the main
branch.
Run npm run dev
to run a development server. This app is used as a playground to experiment with the ngx-dynamic-heading lib
This project uses conventional commits, so make sure all commits adhere to conventional rules. Learn more at https://www.conventionalcommits.org/en/v1.0.0/
Make sure extension conventional-commits is installed.
Type Ctrl + Shift +P
Then enter conventional-commits and then just answer the questions regarding your commit
To run unit tests run npm run test
or npm run test:dev
to run it in watch mode.
We follow a Code of Conduct to ensure a welcoming and inclusive environment for all contributors. Please review and abide by it when participating in the project.
This project is licensed under the MIT License - see the LICENSE file for details.
Thank you for taking an interest in ngx-dynamic-headings ! Your contributions will be invaluable in making the project better. Happy coding!