Angularjs
wosuizi0971
这个作者很懒,什么都没留下…
展开
-
Angularjs绑定checkbox 选中项 ng-checked
<input type="checkbox" class="ace" name="node_select" ng-model="item.F1" ng-checked="item.F1 === '1'" ng-true-value="'1'" ng-false-value="'0'" />原创 2021-08-11 19:50:20 · 180 阅读 · 0 评论 -
Angularjs自定义过滤器
//定义一个过滤器 如果status=1 输出‘有效’,否则输出‘无效’app.filter('StatusFillter', function () { return function (input) { if (input != undefined && input != null && input == '1') return '有效'; else .原创 2021-08-11 19:45:32 · 124 阅读 · 0 评论 -
Angularjs等ng-repeat渲染完后绑定执行事件
//有些方法需要在ng-repeat渲染完成后执行(没有渲染完成页面有些元素还没有,没法绑定一些事件) app.directive('repeatFinish', function ($timeout) { return { link: function (scope, element, attr) { if (scope.$last === true) { $.原创 2021-08-11 19:42:22 · 206 阅读 · 0 评论 -
Angularjs 根据多个条件过滤数据
<li ng-repeat="project in Model.projectList|filter:{companyId:company.companyId}|filter:{stageCode:company.stageCode}|filter:{finishMonth:month.monthCode}"> </li>原创 2021-08-11 19:35:31 · 290 阅读 · 0 评论 -
Angularjs前台转换成string类型
app.directive("toString", function () { return { restrict: "A", require: "ngModel", link: function (scope, elem, attr, ngModelCtr) { ngModelCtr.$formatters.push(fu.原创 2021-08-11 19:31:48 · 367 阅读 · 0 评论 -
AngularJS ng-class(动态)
<span class="label" ng-class="{'0':'label-info','1':'label-warning','2':'label-success'}[R.ApproveStatus]">{{R.ApproveStatus|ApprovalType}}</span>原创 2021-08-11 09:07:19 · 209 阅读 · 0 评论 -
Angularjs 排序
@{ Layout = null;}<!DOCTYPE html><html ng-app="my_app"><head> <meta name="viewport" content="width=device-width" /> <title>Index</title> <script src="~/Scripts/jquery-1.10.2.min.js"></script.原创 2021-08-11 09:10:49 · 189 阅读 · 0 评论