欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Bootstrap與Angularjs的模態(tài)框?qū)嵗a

 更新時間:2017年08月03日 13:29:31   作者:醉小義  
這篇文章主要介紹了Bootstrap與Angularjs的模態(tài)框?qū)嵗a,需要的朋友可以參考下

先給大家展示下效果圖,感興趣的朋友參考下實(shí)現(xiàn)代碼吧

效果圖如下所示:

具體代碼如下所示:

<!DOCTYPE html> 
<html lang="en"> 
<head> 
  <meta charset="UTF-8"> 
  <title>Title</title> 
  <script src="https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></script> 
  <link rel="stylesheet"  rel="external nofollow" > 
  <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script> 
  <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
  <script > 
    angular.module("myApp",[]).controller("myControl",["$scope",function($scope){ 
      $scope.fun = function(){ 
        $('#basic').modal('show'); 
      } 
      $('#basic').on('hidden.bs.modal', function () { //模態(tài)框取消時觸發(fā)的事件 
        // 執(zhí)行一些動作... 
        alert("sadsfsdfds"); 
      }) 
    }]); 
  </script> 
</head> 
<body ng-app="myApp" ng-controller="myControl"> 
  <div class="modal fade" id="basic" tabindex="-1" role="basic" aria-hidden="true"> 
    <div class="modal-dialog"> 
      <div class="modal-content"> 
        <div class="modal-header"> 
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> 
          <h4 class="modal-title" id="title"> 
            模態(tài)框的標(biāo)題 
          </h4> 
        </div> 
        <div class="modal-body"> 
          文本內(nèi)容 
        </div> 
        <div class="modal-footer"> 
          <button type="button" class="btn btn-default" data-dismiss="modal">關(guān)閉</button> 
          <button type="button" class="btn btn-primary">提交更改</button> 
        </div> 
      </div> 
    </div> 
  </div> 
  <!-- 
    兩種方式去調(diào)用模態(tài)框 
  --> 
  <button type="button" ng-click="fun()">模態(tài)框</button> 
  <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#basic"> 
    開始演示模態(tài)框 
  </button> 
<!-- 
data-target="#myModal" 是您想要在頁面上加載的模態(tài)框的目標(biāo)。您可以在頁面上創(chuàng)建多個模態(tài)框,然后為每個模態(tài)框創(chuàng)建不同的觸發(fā)器。 
您可以在頁面上創(chuàng)建多個在不同時間進(jìn)行加載。 
--> 
</body> 
</html> 

總結(jié)

以上所述是小編給大家介紹的Bootstrap與Angularjs的模態(tài)框?qū)嵗a,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

  • Angular管道PIPE的介紹與使用方法

    Angular管道PIPE的介紹與使用方法

    這篇文章主要給大家介紹了關(guān)于Angular管道PIPE的相關(guān)資料,管道的作用就是傳輸,并且不同的管道具有不同的作用,需要的朋友可以參考下
    2021-06-06
  • 詳解Angular 4.x NgTemplateOutlet

    詳解Angular 4.x NgTemplateOutlet

    這篇文章主要介紹了詳解Angular 4.x NgTemplateOutlet,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-05-05
  • AngularJS ng-repeat指令中使用track by子語句解決重復(fù)數(shù)據(jù)遍歷錯誤問題

    AngularJS ng-repeat指令中使用track by子語句解決重復(fù)數(shù)據(jù)遍歷錯誤問題

    這篇文章主要介紹了AngularJS ng-repeat指令中使用track by子語句解決重復(fù)數(shù)據(jù)遍歷錯誤問題,結(jié)合實(shí)例形式分析了ng-repeat指令遍歷JavaScript數(shù)組錯誤的原因與相關(guān)解決技巧,需要的朋友可以參考下
    2017-01-01
  • ng-repeat指令在迭代對象時的去重方法

    ng-repeat指令在迭代對象時的去重方法

    今天小編就為大家分享一篇ng-repeat指令在迭代對象時的去重方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2018-10-10
  • AngularJS基礎(chǔ)知識

    AngularJS基礎(chǔ)知識

    這篇文章主要介紹了AngularJS基礎(chǔ)知識,包括AngularJS定義和特點(diǎn)以及構(gòu)建AngularJS應(yīng)用的方法,推薦給大家。
    2014-12-12
  • Angular2實(shí)現(xiàn)自定義雙向綁定屬性

    Angular2實(shí)現(xiàn)自定義雙向綁定屬性

    本篇文章主要介紹了Angular 2實(shí)現(xiàn)自定義 雙向綁定 屬性,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-03-03
  • BootStrap+Angularjs+NgDialog實(shí)現(xiàn)模式對話框

    BootStrap+Angularjs+NgDialog實(shí)現(xiàn)模式對話框

    在完成一個后臺管理系統(tǒng)時,需要用表格顯示注冊用戶的信息。但是用戶地址太長了,不好顯示。所以想做一個模式對話框,點(diǎn)擊詳細(xì)地址按鈕時,彈出對話框,顯示地址。下面小編給大家分享下實(shí)現(xiàn)方法,一起看下吧
    2016-08-08
  • 淺談Angular4中常用管道

    淺談Angular4中常用管道

    本篇文章主要介紹了Angular4中常用管道,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-09-09
  • angular.js實(shí)現(xiàn)購物車功能

    angular.js實(shí)現(xiàn)購物車功能

    這篇文章主要為大家詳細(xì)介紹了angular.js購物車功能的實(shí)現(xiàn)代碼,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-10-10
  • AngularJs動態(tài)加載模塊和依賴注入詳解

    AngularJs動態(tài)加載模塊和依賴注入詳解

    這篇文章主要為大家介紹了AngularJs動態(tài)加載模塊和依賴注入,感興趣的小伙伴們可以參考一下
    2016-01-01

最新評論