Bootstrap number validation

It’s not Twitter bootstrap specific, it is a normal HTML5 component and you can specify the range with the min and max attributes (in your case only the first attribute). For example: <div> <input type=”number” id=”replyNumber” min=”0″ data-bind=”value:replyNumber” /> </div> I’m not sure if only integers are allowed by default in the control or not, … Read more

Closing Twitter Bootstrap Modal From Angular Controller

We can achieve the same without using angular-ui. This can be done using angular directives. First add the directive to the modal. <div class=”modal fade” my-modal ….>…</div> Create a new angular directive: app.directive(‘myModal’, function() { return { restrict: ‘A’, link: function(scope, element, attr) { scope.dismiss = function() { element.modal(‘hide’); }; } } }); Now call … Read more

External resources in JSFiddle (Adding Twitter Bootstrap CDN)

BootstrapCDN is supported by JSFiddle, you just need to paste in the relevant URLs. In the external resource field/box enter each of these URLs* and hit +: http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js The result of which is: http://jsfiddle.net/v9ec3/1/ Which then allows you to post your HTML/CSS/JS as required. Edit away and click update when finished to give you … Read more