angular-sailsAngularJS 模块
angular-sails 是使用 Sails Socket.io API 的 AngularJS 模块。
据说,用了 Angular-sails,从此告别 Ajax!
安装
bower install angular-sails
使用示例
var app = angular.module("MyApp", ['ngSails']); //OPTIONAL! Set socket URL! app.config(['$sailsProvider', function ($sailsProvider) { $sailsProvider.url = 'http://foo.bar'; }]); app.controller("FooController", function ($scope, $sails) { $scope.bars = []; (function () { $sails.get("/bars") .success(function (data) { $scope.bars = data; }) .error(function (data) { alert('Houston, we got a problem!'); }); $sails.on("message", function (message) { if (message.verb === "create") { $scope.bars.push(message.data); } }); }()); });
评论
angular-sailsAngularJS 模块
angular-sails是使用SailsSocket.ioAPI的AngularJS模块。据说,用了Angular-sails,从此告别Ajax!安装bower install angular-sa
angular-sailsAngularJS 模块
0
mod_rpafApache模块
mod_rpaf是一个Apache的模块,利用它可以给Apache的后端应用提供客户端真实的IP地址。使用方法:#ifDSOloadmodulefirst:LoadModulerpaf_modulel
mod_rpafApache模块
0
svg-spriteNode.js 模块
svg-sprite是一个低层次的Node.js模块,它可以将一堆SVG文件进行优化,然后将它们烤成几种类型的SVGsprites,并包含合适样式表的资源(例如CSS,Sass,LESS,Stylus
svg-spriteNode.js 模块
0