随笔分类 - Angular JS
Angular JS
摘要:在angular项目中用到了tslint检测代码,可用如下修正tslint提示的大部分错误提示 2. tslint --fix -c ./tslint.json 'src/**/*{.ts,.tsx}'
阅读全文
摘要:FormGroup 的详细讲解地址: https://www.angular.cn/api/forms/FormGroup#registercontrol 标颜色出用了 addControl()方法 这个写法可表单里面动态添加属性
阅读全文
摘要:{{data.seller?.photos&&data.seller?.photos['03']&&data.seller?.photos['03'][0].id}}?可处理属性为空的情况, {{records && records[0]}} 用&&可处理数组内容为空的情况。
阅读全文
摘要:1.下载Excel 文件 2.下载ZIP 浏览器有时候会拦截窗口 所以下载excel zip 文件的时候创建a标签下载 保存到本地即可。如上zip下载示例。 下载示例:
阅读全文
摘要:Sum of two Numbers using AngularJS Using Double Negation First Number: Second Number: Sum: {{ a -- b }} Using Input Type Number First Numbe...
阅读全文
摘要:页面刷新$route.reload() (要注入$route); 或者$window.location.reload() 两种效果不一样,前者适合路由刷新
阅读全文
摘要:按时间降序排。在字段名前加个“-”号即可。(个人觉得这个方法比较好) 方法二:
阅读全文
摘要:$location.path('url').search({newNo: $scope.nextBillNo,lastBill:$scope.lastBill,billNo:$scope.obj.billnum});带参数跳转页面新的页面可以接收到值 $scope.newNo=$routeParams.newNo;$scope.lastBill=$routeParams.lastBill...
阅读全文
摘要:这个服务可以创建一个资源对象,我们可以用它非常方便地同支持RESTful的服务端数据源进行交互,当同支持RESTful的数据模型一起工作时,它就派上用场了。 REST是Representational State Transfer(表征状态转移)的缩写,是服务器用来智能化地提供数据服务的一种方式 1
阅读全文
摘要://导出excel表$scope.exportOrder = function () { $scope.datetime.startTime=$scope.year+"-"+ $scope.lastmounth+"-"+$scope.lastday; $scope.datetime.endTime=
阅读全文
摘要:$route.current.params
阅读全文
摘要:直接给它一个初始值就可以了 ng-model的值等于默认选中的value
阅读全文
摘要:因此,解决ng-if中ng-model值无效的问题,主要方法就是在绑定值时添加$parent标识,或者用ng-show指令代替ng-if指令,这两种方法都可以达到同样的页面效果。 http://blog.csdn.net/u013451157/article/details/60866210 2 笔
阅读全文
摘要:<style> .home{ color: red; background-color:lightblue; }</style><body><div class="container" ng-controller="c1"> <span ng-repeat="x in arry"> <label >
阅读全文

浙公网安备 33010602011771号