zoukankan      html  css  js  c++  java
  • Spring Boot 商城项目

    Spring Boot 商城项目

    angularJS Demo1

    <html>
    <head>
    <title>angularJS Demo1</title>
    <script src="angular.min.js"></script>
    </head>
    <body ng-app>
    {{100+200}}
    </body>
    </html>

     Demo2

    <html>
    <head>
    <title>angularJS Demo1</title>
    <script src="angular.min.js"></script>
    </head>
    <body ng-app>
    请输入姓名:<input ng-model="name">
    <br>
    {{name}}你好
    </body>
    </html>

     Demo3

    <html>
    <head>
    <title>angularJS Demo1</title>
    <script src="angular.min.js"></script>
    </head>
    <body ng-app ng-init="name='克里斯'">
    请输入姓名:<input ng-model="name">
    <br>
    {{name}}你好
    </body>
    </html>

     Demo4

    <html>
    <head>
    <title>angularJS Demo</title>
    <script src="angular.min.js"></script>
    <script>
    //建立模块
    var app=angular.module("myApp",[]);
    //创建控制器 $scope就是控制层与视图层直接交换数据的桥梁
    app.controller("myController",function($scope){
        $scope.add=function(){
            $scope.z=parseInt($scope.x) + parseInt($scope.y);
        }
    });
    </script>
    </head>
    <body ng-app="myApp" ng-controller="myController">
    第一个数:<input ng-model="x"><br>
    第二个数:<input ng-model="y"><br>
    <button ng-click="add()">计算</button>
    <br>
    计算结果:{{z}}
    </body>
    </html>

     Demo5

    <html>
    <head>
    <title>angularJS Demo 7</title>
    <script src="angular.min.js"></script>
    <script>
    //建立模块
    var app=angular.module("myApp",[]);
    //创建控制器 $scope就是控制层与视图层直接交换数据的桥梁
    app.controller("myController",function($scope){
        $scope.list=[
            {name:'张三',math:100,yuwen:100},
            {name:'李四',math:80,yuwen:90},
            {name:'王五',math:70,yuwen:60}
        ];
    });
    </script>
    </head>
    <body ng-app="myApp" ng-controller="myController">
    <table>
        <tr>
            <td>姓名</td>
            <td>语文</td>
            <td>数学</td>
        </tr>
        <tr ng-repeat="entity in list">
            <td>{{entity.name}}</td>
            <td>{{entity.math}}</td>
            <td>{{entity.yuwen}}</td>
        </tr>    
    </table>
    </body>
    </html>
  • 相关阅读:
    属性与字段的区别
    修改LVDS支持1024*600分辨率
    Altium designer 10如何设置标题栏
    嵌入式C开发人员的最好的0x10道笔试题
    进程线程及堆栈关系的总结
    GDB调试
    c语言
    如何使用autotools生成Makefile
    ubuntu NFS
    Ubuntu安装配置TFTP服务
  • 原文地址:https://www.cnblogs.com/taiguyiba/p/10051161.html
Copyright © 2011-2022 走看看