• My 1st webUI try


    1. Add three control to the UI: StartTime EndTime Weekdays:

    2015-11-17 20:26:40

    data-model: Html5在html里的体现

    k-checklist-model: kendoUI

    ng-click/ng-value/ng-checked: Angular在html里的体现

     1   <div class="pn-module-funcname-new-field">
     2             <div>Start Time</div>
     3             <input class="ds-import-conn-new-value" kendo-time-picker k-ng-model="selectedStartTime" k-options="startTimeOptions" />
     4   </div>
     5   <div class="pn-module-funcname-new-field">
     6             <div>End Time</div>
     7             <input class="ds-import-conn-new-value" kendo-time-picker k-ng-model="selectedEndTime" k-options="endTimeOptions" />
     8   </div>
     9   <div class="pn-module-funcname-new-field">
    10        <div>Days Of Week to Run</div>
    11        <br />
    12        <div class="pn-module-funcname-new-checkbox">
    13                 <div ng-repeat="item in checkBoxWeekdays">
    14                     <input type="checkbox" ng-checked="selectedWeekdays.indexOf(item) > -1" ng-value="{{item}}" ng-click="check(item, $event)"> {{item}}
    15                 </div>
    16        </div>
    17   </div>

     js:

     1      $scope.checkBoxWeekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
     2 
     3         $scope.check = function (value, e) {
     4             var idx = $scope.selectedWeekdays.indexOf(value);
     5             if (idx >= 0 && !e.target.checked) {
     6                 $scope.selectedWeekdays.splice(idx, 1);
     7             }
     8             if (idx < 0 && e.target.checked) {
     9                 $scope.selectedWeekdays.push(value);
    10             }
    11         };

    2. ng-change doesn't get the $event argument

    https://github.com/angular/angular.js/issues/6370

     

  • 相关阅读:
    如何编译完全使用静态库的可执行文件
    交叉编译jpeglib遇到的问题
    安装SDL遇到的问题
    软链接/硬链接删除事项
    alias命令使用
    Linux下学习摄像头使用
    018 字符串类型及操作
    017 示例3-天天向上的力量
    016 数字类型及操作
    015 基本数据类型
  • 原文地址:https://www.cnblogs.com/purple1/p/4972733.html
Copyright © 2020-2023  润新知