为了账号安全,请及时绑定邮箱和手机立即绑定

angular js判断分类名是否重复。请问报http:404是什么原因呢?

angular js判断分类名是否重复。请问报http:404是什么原因呢?

holdtom 2018-09-12 11:09:42
angular js判断分类名是否重复。请问报http:404是什么原因呢?findByCategory:function(category,successCall,errorCall){  HttpService.send({method: 'GET',url: '/workType/category' + category},successCall,errorCall);}mmsDirectives.directive('categoryValidation', ['WorkTypeService', function(WorkTypeService) {    return {        require: 'ngModel',        link: function(scope, elm, attrs, ctrl) {            ctrl.$parsers.unshift(function(viewValue) {                if(viewValue) {                    WorkTypeService.findByCategory(viewValue, function(workTypes) {                        if(_.isEmpty(workTypes) || workTypes.category== attrs.categoryValidation) {                            ctrl.$setValidity('category', true);                        } else {                            ctrl.$setValidity('category', false);                        }                    });                }                return viewValue;            });        }    };}]);
查看完整描述
  • 1 回答
  • 0 关注
  • 649 浏览

添加回答

代码语言

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号