Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/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
Angularjs 如何使用角双簧管而不使用;“双簧管未定义”;_Angularjs - Fatal编程技术网

Angularjs 如何使用角双簧管而不使用;“双簧管未定义”;

Angularjs 如何使用角双簧管而不使用;“双簧管未定义”;,angularjs,Angularjs,我想对http请求使用“角度双簧管”,因此返回非常大的json。我包括了这个库,并在我的控制器中放了一个函数,但我得到了“错误:双簧管未定义”。我不知道我是否遗漏了其他自由,或者这可能是问题所在 我的代码 var-app=angular.module('dataview',['ngOboe'])) 应用控制器('DataViewCtrl',函数($scope,Oboe){ $scope.oboeget=函数(uri) { //在uri中,我传递url以便重新运行json $scope.data

我想对http请求使用“角度双簧管”,因此返回非常大的json。我包括了这个库,并在我的控制器中放了一个函数,但我得到了“错误:双簧管未定义”。我不知道我是否遗漏了其他自由,或者这可能是问题所在

我的代码

var-app=angular.module('dataview',['ngOboe']))
应用控制器('DataViewCtrl',函数($scope,Oboe){
$scope.oboeget=函数(uri)
{
//在uri中,我传递url以便重新运行json
$scope.data=[];
双簧管({
url:uri,
模式:“{timestamp}”,
开始:函数(流){
$scope.stream=流;
$scope.status='reading….';
},
完成:函数(){
$scope.status='done';
}
}).然后(函数(){
//不用
},函数(错误){
//一些错误
},功能(记录){
$scope.data.push(记录);
});
}
}

你需要在角双簧管之前加入双簧管

<script src="/bower_components/oboe/dist/oboe-browser.min.js"></script>
<script src="/bower_components/angular-oboe/dist/angular-oboe.min.js"></script>

我创建了一个pull请求来更新文档:

我注意到在您的错误中,双簧管是小写的,但在代码中是大写的。您是手动键入错误并可能更改大小写,还是与错误的大小写相同?