Reputation: 1
i have a index.html page inside that we have a following line of code for opening a bootstrap modal:
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
</div>
</div>
</div>
<a data-toggle="modal" class="btn btn-info" href="registration.html" data-target="#myModal">Click me !</a>
so on the click of 'Click me' i want the registration.html to be opened inside the 'modal-content'.
lets see the code inside the registration.html:
<script src="js/app.js"></script>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
</button>
<h4 class="modal-title" id="myModalLabel">Matrix Registration</h4>
</div>
<div class="modal-body">
<form class="form-horizontal b1">
<script type="text/x-handlebars">
<div class="row">
<span>Hello, <strong>{{welcomefirstName}} {{welcomelastName}}</strong>!</span>
</div>
</script>
</form>
</div>
while clicking the click me the modal is opening but the ember tag({{welcomefirstName}}) rendering is not working so i am not getting the actual values for handle bars instead getting only the place holders as it is.
any suggestions will be helpfull.
Thanks.
Upvotes: 0
Views: 75
Reputation: 970
Are you trying to open the modal with the bootstrap js script ?
If so, that's not how I would do it :
There is a pretty good example here http://emberjs.com/guides/cookbook/user_interface_and_interaction/using_modal_dialogs/
Basically, you want to put a named outlet on your "index"
{{outlet 'modal'}}
and declare an "openModal" action on your route which will "attach" your modal template to the outlet.
Upvotes: 1