Oboe 地址:http://oboejs.com/
1.安装 bower
bower install oboe
2.使用,ajax 模式
oboe('/myapp/things.json') .done(function(things) { // we got it }) .fail(function() { // we don't got it });
3. stream 模式
oboe('/myapp/things.json') .node('foods.*', function( foodThing ){ // This callback will be called everytime a new object is // found in the foods array. console.log( 'Go eat some', foodThing.name); }) .node('badThings.*', function( badThing ){ console.log( 'Stay away from', badThing.name); }) .done(function(things){ console.log( 'there are', things.foods.length, 'things to eat', 'and', things.nonFoods.length, 'to avoid'); });
4. API 手册:
http://oboejs.com/api
5. angular 插件:
https://github.com/RonB/angular-oboe
注意:本地测试可能没有什么效果,但是如果放在服务器上,效果就可以看出来了
对于web 体验以及性能还是有比较好的帮助的。