Hi,
           Can I open a Angular UI bootstrap modal window from the view 
 like this ? I am trying to simplify the form validation by not calling 
acontroller.

        <script 
src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.11.2/ui-bootstrap-tpls.js";></script>
 
        <script>
            $scope.open = function (refactor) {

              var modalInstance = $modal.open({
                templateUrl: 'refactor.html',
                resolve: {
                  items: function () {
                    return $scope.items;
                  }
                }
              });

            };
        </script>
        <script type="text/ng-template" id="refactor.html">
            <div class="modal-header">
                <h3 class="modal-title">Modal!</h3>
            </div>
            <div class="modal-body">
                <div >Body</div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-primary" 
ng-click="$close('awesome')">OK</button>
                <button class="btn btn-warning" 
ng-click="$dismiss('nah')">Cancel</button>
            </div>
        </script> 



Thanks,
Mohan

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to