0

I'm starting with AngularJS and I'm having some issues with routes. I configured my project for html5mode, I set my tag, and everything was ok.

The problem comes when I try to use a bootstrap modal. The link that fires the modal is:

<a data-toggle="modal" href="#upload-files" >Upload files</a>

The modal code is:

<div class="modal hidden" id="upload-memories">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Upload memories</h4>
      </div>
      <div class="modal-body">
        asdadsd
      </div>
      <div class="modal-footer">
        <a href="#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>

So the href in the anchor references the modal's id, not a route. But my application is going to home page (because the 'otherwise' I suppose).

Can I say AngularJS to ignore this? or is there a better solution?.

Thank you very much!

user2071887
  • 123
  • 1
  • 2
  • 5
  • Take a look at my answer for another similar question. http://stackoverflow.com/a/17911238/304319 and also this live [demo](http://plnkr.co/edit/ZaMHqR?p=preview) – zs2020 Jul 29 '13 at 19:16
  • Nevermind my last comment.. I realized the problem is probably that you've needed to add a base url for your html5 based routes, so you can't construct valid hashtags for the current page... – lossleader Jul 30 '13 at 07:14

0 Answers0