accessibility
accessibility copied to clipboard
how to use with angular
just i am wondering how to use this lib with angular 18?
Hi @AhmedHossamFCI You can use it just like you would with any other type of library, framework of vanilla javascript. I've actually tried it on some simple testing Angular app and it works as expected.
- Add the package to the
dependenciessection on thepackage.jsonfile:
"accessibility": "*"
and run npm install.
2. Import the Accessibility class to the component that you want to display the tool (for example app.component.ts) like so:
import { Accessibility } from 'accessibility';
- Create a new instance of the class like this:
ngAfterViewInit() {
setTimeout(async () => {
new Accessibility();
});
}
Please let me know if there are any issues with the tool in Angular.