angularjs - how to use angular oboe without "oboe is not defined" -


i want use "angular oboe" http requests returning large json. included library , put function in controller, "error: oboe undefined". dont know if miss include other libreĆ­a or may problem.

my code

var app = angular.module('dataview', ['ngoboe'])  app.controller('dataviewctrl', function($scope, oboe){       $scope.oboeget = function(uri)      {          //in uri pass url retun json          $scope.data = [];            oboe({              url: uri,              pattern: '{timestamp}',               start: function(stream) {                  $scope.stream = stream;                  $scope.status = 'reading....';              },              done: function() {                  $scope.status = 'done';              }          }).then(function() {              // not used          }, function(error) {              // error          }, function(record) {              $scope.data.push(record);          });      }    }
<script src="/bower_components/angular/angular.min.js"></script>  <script src="/bower_components/angular-oboe/dist/angular-oboe.min.js"></script>                                                                        

you need include oboe before angular-oboe.

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

i created pull request update documentation : https://github.com/ronb/angular-oboe/pull/8


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -