91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Cordova學習筆記 angular 中一些標簽的使用

發布時間:2020-07-26 02:47:10 來源:網絡 閱讀:512 作者:hello_world007 欄目:開發技術
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <style>
            .red{
                background-color: red;
            }
           .black{
               background-color: black;
           }
    </style>
    <script src="js/angular.js"></script>
    <script type="application/javascript">
        (function(angular) {
            'use strict';
            angular.module('myApp', [])
                    .controller('firstController', function firstController($scope,$sce) {
                        $scope.witchColor = {red:true,black:false};
                        $scope.changeColor = function(){
                            if($scope.witchColor.red){
                                $scope.witchColor.red = false;
                            }else{
                                $scope.witchColor.red = true;
                            }

                            if($scope.witchColor.black){
                                $scope.witchColor.black = false;
                            }else{
                                $scope.witchColor.black = true;
                            }
                        }
                        $scope.teststyle={color:'yellow'};
                        $scope.address= "http://www.baidu.com";
                        $scope.idshow = true;
                        $scope.idshow = false;
                        $scope.mySwitch = 3;
                        $scope.t1 = "test1";
                        $scope.t2 = "test2";
                        $sce.trustAsHtml("<a );
                        $scope.myhtml1= $sce.trustAsHtml("<a );//$sce 中的trustAsHtml來信任這個html內容
                    });

        })(window.angular);//主模塊

        window.onload = function(){
            var myAppdiv = document.getElementById('myApp22');
            angular.bootstrap(myAppdiv,['myApp']) //動態的綁定主mudule的html作用范圍
        }
    </script>
</head>
<body >
<div id="myApp22">
    <div ng-controller="firstController">
            <div ng-class="witchColor">test</div>
        <input type="button" value="changeColor" ng-click="changeColor()"/>
        <div ng->test</div>
        <a ng-href="`address`">www</a>
        <div ng-show="idshow">您</div>
        <div ng-switch on="mySwitch">
            <span ng-switch-default> 0</span>
            <span ng-switch-when="1">1</span>
            <span ng-switch-when="2">2</span>
            <span ng-switch-when="3">3</span>
        </div>
        <div ng-bind-template="`t1``t2`"></div><!--綁定多個-->
        <div ng-bind-html="myhtml1" >1212</div> <!--把這個div中的innerHtml綁定到變量myhtml-->
    </div>
</div>
</body>
</html>


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

马边| 喀什市| 海丰县| 柳江县| 扎囊县| 柏乡县| 临泉县| 罗源县| 永靖县| 阜康市| 辉县市| 广德县| 铁岭县| 察雅县| 昌邑市| 荆门市| 文山县| 富锦市| 黄平县| 宿松县| 德江县| 吉木乃县| 太仓市| 嵩明县| 云林县| 枞阳县| 江陵县| 京山县| 双柏县| 邵武市| 长葛市| 肥东县| 安徽省| 九台市| 威宁| 吉木乃县| 建昌县| 吴忠市| 永平县| 东海县| 洛川县|