timeoutメソッドを使用して2000msの遅延を追加しようとしていますが、これをcotroller内の関数(searchfunc)で呼び出そうとすると機能しません。 Error:$ timeoutは関数ではありません。 コントローラーコード:
var angularjsapp = angular.module('graphApp', ['ngAnimate', 'ui.bootstrap','ui.grid']);
angularjsapp.controller('AccordionDemoCtrl', function($scope, $timeout) {
$scope.searchfunc = function(search_name,$timeout) {
WebSocketTest(search_name,keyword_type);
//$scope.loading = false;
$timeout(function() {
$scope.loading = false;
}, 2000);
});