Meteor: Bootstrap Modal breaks when handlebars values change

前端 未结 2 1843
别跟我提以往
别跟我提以往 2020-12-22 05:13

I\'m making a modal to handle payments, and I want to use some handlebars helpers to do form validation.

Here\'s the html:



        
相关标签:
2条回答
  • 2020-12-22 05:43
    <div class="modal fade" id="paymentModal" tabindex="-1" role="dialog" aria-labelledby="paymentModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                     {{> someOtherTemplate}}
    

    It's a hack until the new blaze UI comes out.

    The reason it fails is because as soon as the template changed, the entire template is redrawn, but the twitter bootstrap code is not applied.

    0 讨论(0)
  • 2020-12-22 05:47

    Here is an example of using Bootstrap modal's with Meteor's Spark rendering engine: http://modal-example.meteor.com/

    Source: https://github.com/alanning/meteor-modal-example

    As @BradM points out, this kind of thing hopefully won't be an issue once Blaze (Meteor's new rendering engine) is released.

    0 讨论(0)
提交回复
热议问题