RandomUs1r
RandomUs1r

Reputation: 4190

UI-Router href="#' not working

I'm trying to get the bootstrap dropdown menu example to work with UI-Router:

 <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            Page 1
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="#">Page 1-1</a></li>
                            <li><a href="#">Page 1-2</a></li>
                            <li><a href="#">Page 1-3</a></li>
                        </ul>

I tried the solutions from Angular-ui-router and href='#' with no luck. It's currently interpreting # as state change and redirecting me back to home since it can't match it. What is the best practice approach for using href="#" with UI-Router?

Upvotes: 0

Views: 421

Answers (1)

JeanJacques
JeanJacques

Reputation: 1754

Here is a working plunker using UI-Router and Boostrap Dropdown. If you remove the href attribute, it doesn't cause any ploblem or redirection

Upvotes: 1

Related Questions