0
希望在5秒延迟后执行applyParameters函数。不过,我目前的语法没有这样做。有延迟的角函数
有关如何做到这一点的任何想法?
//Add and update categories
var categories = homeData['categories'];
for(var catIndex in categories){
var category = categories[catIndex];
$scope.addCategory(category);
}
$scope.search.text = homeData['keyword'];
//Pick first company in the results
$scope.updateSelectedCompany(response.data[0]);
//populate parameters if passed in after 1 second delay
$timeout($scope.applyParameters($routeParams.param1), 5000);