angular-sails

码农软件 · 软件分类 · AngularJS 扩展 · 2019-03-17 11:27:32

软件介绍

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);
      }
    });
  }());
});

本文地址:https://codercto.com/soft/d/1537.html

Operating System Algorithms

Operating System Algorithms

Nathan Adams、Elisha Chirchir / CreateSpace Independent Publishing Platform / 2017-4-21 / USD 39.15

Operating System Algorithms will walk you through in depth examples of algorithms that you would find in an operating system. Selected algorithms include process and disk scheduling.一起来看看 《Operating System Algorithms》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具