Is there a way to achieve an active class on navigation items, in Foundation for Sites templates, like you can with Foundation for Apps using ui-sref-active?
Thursday, December 17, 2015 at 10:35 PM EST
We defer active state management for navigation, pagination, etc. to the backend. ui-router's ui-sref-active exists because Angular is designed for single-page apps, which manage state on the client side.
If you hook your Foundation site into a backend framework like Rails, you can use that to manage active state. If you're building a static site, you might have access to a templating engine like Handlebars, which would allow you to do something similar.
Create an Account
Get up to speed FAST, learn straight from the experts who built Foundation.
Learn Foundation from the creators in our interactive online webinars which will keep you up to date with the latest trends and skills needed to win your projects.
Or if you prefer, contact the Foundation Team at [email protected] or (408) 341-0600 x635