This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sdk = require('sdk'); | |
// init a API | |
var demo = new sdk({ | |
read: { | |
url: '/demo/read/{{name}}', | |
method: 'get' | |
}, | |
update: { | |
url: '/demo/update', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "include.h" | |
/* | |
{ | |
"method":"helloworld.onoff", | |
"params":"on"/"off" | |
} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Book = function(name) { | |
this.name = name; | |
this.demo = '123'; | |
} | |
var Method = function() { | |
// 继承了 Book 的静态属性 this.demo = '123' | |
Book.apply(this, arguments); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html(ng-app="app") | |
head | |
title demo | |
body | |
#wrap(ng-controller="myCtrl") | |
h1 我是 {{me.name}} , 我已经 {{me.age}} 岁了 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 引入menkr cdn 提供的seajs源 和 配置文件 --> | |
<script src="http://cdn.menkr.com/sea.js" data-config="config/config.js" charset="utf-8"></script> | |
<script> | |
// 使用别名(alias)加载组件 | |
seajs.use(['jquery', 'moment'], function($, moment) { | |
$(document).ready(function() { | |
console.log('Menkr CDN 上线时间距离现在:') | |
console.log(moment("20130329", "YYYYMMDD").fromNow()) | |
}); | |
}); |
NewerOlder