angularJs用到的搜索指令

advanced-search(id="jobTemplateSearch" top="40px" left="0"  advanced-search-tpl="app/views/advancedSearch/advancedSearch_task.html" ,advanced-search-callback="advancedSearchCallback" ,advanced-search-button="#search" ,advanced-search-controller="advancedSearchCtrl_task" search-content="jobName" disable="tableDatas.loading" search-method="search()" search-placeholder="请输入节点名称")
在使用自定义指令的时候,通过advanced-search-tpl来引入一个html文件(使用的jade模板),advanced-search-callback是这个指令调用的callback方法(如下:),advanced-search-controller当然它是如字面意思给定模板一个控制器来操作作用域中,各个对象的初始状态以及相应的行为,
$scope.advancedSearchCallback = function (searchScope) {
$scope.params = searchScope.data;
if (!searchScope.data.jobName) {
delete $scope.params.jobName;
}
$scope.tableDatas.refresh();
};
posted @ 2018-09-03 10:13  Ari1c  阅读(189)  评论(0编辑  收藏  举报