Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用过滤器在angular js中进行排序_Javascript_Angularjs_Angularjs Directive_Angularjs Scope_Ionic Framework - Fatal编程技术网

Javascript 如何使用过滤器在angular js中进行排序

Javascript 如何使用过滤器在angular js中进行排序,javascript,angularjs,angularjs-directive,angularjs-scope,ionic-framework,Javascript,Angularjs,Angularjs Directive,Angularjs Scope,Ionic Framework,您能告诉我当用户单击每列的标题时,如何按升序和降序对列进行排序。我有一个列表,其中标题位于顶部。我想使用“^”和“V”对我的列进行排序键。我发出一个指令对我的列进行排序,但它不起作用。首先,我的图像不显示此图像“V”和“^”(不显示),其次,当我单击标题列时,它不按升序和降序对表进行排序 这是我的密码 模板 .run(function($templateCache) { $templateCache.put('sort-header.html', '<button class="

您能告诉我当用户单击每列的标题时,如何按升序和降序对列进行排序。我有一个列表,其中标题位于顶部。我想使用“^”“V”对我的列进行排序键。我发出一个指令对我的列进行排序,但它不起作用。首先,我的图像不显示此图像“V”和“^”(不显示),其次,当我单击标题列时,它不按升序和降序对表进行排序

这是我的密码

模板

.run(function($templateCache) {
    $templateCache.put('sort-header.html', '<button class="buttonHeader button button-clear button-dark fntandbg headerbtnclass columnHeaderFontfamily"><i class="icon"  ng-if="label==\'Account Name\'" ng-class="{\'ion-arrow-down-b\': reverse, \'ion-arrow-up-b\': !reverse}"></i> <strong>{{label}}</strong></button>');
}).
.run(函数($templateCache){
$templateCache.put('sort-header.html','{{label}}');
}).
我能够在标题上添加带有文本的图标,但无法排序 更新plunker

您的plunker未加载。让我检查并更新您plunker服务器有问题。。。!!很快它就会工作了现在plunker工作正常。更新的plunker您的plunker没有加载。让我检查并更新您plunker服务器有问题。。。!!很快它就会工作了现在plunker工作正常。更新了plunker
.run(function($templateCache) {
    $templateCache.put('sort-header.html', '<button class="buttonHeader button button-clear button-dark fntandbg headerbtnclass columnHeaderFontfamily"><i class="icon"  ng-if="label==\'Account Name\'" ng-class="{\'ion-arrow-down-b\': reverse, \'ion-arrow-up-b\': !reverse}"></i> <strong>{{label}}</strong></button>');
}).