Comments (3)
to avoid this you have to manually call the js methods to initialize the component. USWDS doesn't have any concept of the angular router so it has no way of knowing when a navigation has happened. Since USWDS applies its js to static HTML you need let it know that the the HTML is available.
https://github.com/uswds/uswds?tab=readme-ov-file#js-customization
from uswds.
I tried the js method to initialize the component and found that it would show double (as shown in image) since the JS would modify the new static HTML. I fixed this by checking whether the route had been accessed through the router or not and only manually turning the component on when the route had been accessed through the router. I also updated the repo to demonstrate this.
from uswds.
you can also remove the initial script you have included. ONLY doing it via importing and .on, don't have the global script
from uswds.
Related Issues (20)
- USWDS - Bug: Button Specificity Problem
- USWDS - Bug: Table header cells in table body do not get header styling HOT 2
- USWDS - Bug: Cancel File Input Browsing HOT 2
- USWDS - Component lifecycle: Add discussion template
- USWDS - Bug: 508 - Unable to focus on the clear mark for the search field HOT 4
- USWDS - Bug: Mobile software keyboard not dismissed after selecting option in Time picker and Combo box component
- USWDS - Feature Request: Step Indicator styles break for processes with many steps HOT 1
- Research adaptive/alternate input modalities for disabled web users
- Accessibility Checklists: Re-audit components (peer review)
- USWDS - Feature: Add screen reader testing prompt for link component
- USWDS: Release 3.8.0 tasks HOT 3
- POAM - March '24 HOT 1
- USWDS - Bug: Checkbox and Radio Button disabled styles HOT 4
- USWDS - Core: Limit files included in NPM package
- Assess USWDS race and ethnicity guidance
- Consult experts in collection of race/ethnicity data HOT 1
- Update USWDS guidance related to race and ethnicity data HOT 2
- USWDS - Documentation: Allow sidenav reorder via settings
- Identify pages on the Site that would be affected by changes to guidance about data collection on race and ethnicity
- USWDS - Feature: Increase Tap target size on button.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uswds.