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>
  • 相关阅读:
    【Appium】appium踩坑记录:解决每次安装appium setting和Unlock
    Pycharm from XXX import XXX 引入本地文件标红报错(source_path&Python package)
    🍖02 不同平台更换pip源
    🍖pycharm 更换 pip 下载源
    🍖01 路飞学城项目分析
    🍖Vue-cli 创建项目
    🍖Vue 与后端交互
    🍖Vue 计算属性
    🍖Vue 虚拟DOM与Diff算法简介
    🍖Vue 生命期钩子
  • 原文地址:https://www.cnblogs.com/taiguyiba/p/10051161.html
Copyright © 2011-2022 走看看