I've been attempting to achieve something that should be straightforward in theory. Despite my efforts to find a solution through Google, I have yet to come across anything that has successfully worked for me. My current setup involves Angular JS version 1.4.9. Here's what I aim to accomplish:
<site-menu>
<site-menu-item title="Search" href="#/search"/>
<site-menu-item title="Reports" href="#/reports"/>
<site-menu-item title="About" href="#/about"/>
</site-menu>
The desired outcome is as follows:
<ul>
<li><a href="#/search">Search</a></li>
<li><a href="#/reports">Reports</a></li>
<li><a href="#/about">About</a></li>
</ul>
My intention is to implement this functionality as a directive so that when a user clicks on one of the links, an "active" CSS class can be applied to the LI element. Unfortunately, despite my best efforts, I've struggled to make it work. Personally, transclusion and compiling (if these are indeed required) have always been areas where I've faced challenges with Angular 1.x.
If anyone has any insights or suggestions, I would greatly appreciate it!
Thank you in advance!