您的位置:首页 > 其它

Oboe 提升web 用户体验以及性能

2016-06-16 13:21 399 查看
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 体验以及性能还是有比较好的帮助的。

  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: