我想了解为什么此代码有效,但是当它运行时,我收到一条消息:app.controller(...)不是一个函数,我该如何解决?
<script>
var app = angular.module('filtraPedido', []);
app.controller('listdata',function($scope, $http){
$scope.pedidos = [{'pedidoData':'15/01/2016 17:03:10','pedidoId':'603530313428-01','pedidoStatus':'Pagamento Pendente','pedidoValor':'3398','produtoId':'29','produtoNome':'Garrafa Personalizada (350 ml)','produtoPreco':'1400','produtoPagamento':'Boleto Bancário','produtoSeller':'Seller Name','hostname':'seller1','pedidoEstado':'RJ','pedidoCidade':'Rio de Janeiro','pedidoBairro':'Pechincha','utmCampaing': '','utmMedium': '','utmSource': ''}];
$scope.sort = function(keyname){
$scope.sortKey = keyname; //set the sortKey to the param passed
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
}
})();
</script>
这是更新的小提琴。https://jsfiddle.net/kac912ep/3/
刚从()
第94行移除。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句