-
Notifications
You must be signed in to change notification settings - Fork 5
Methods
zodern edited this page Oct 31, 2014
·
2 revisions
#Methods
Methods try to duplicate the functionality of meteor.methods.
#Limitations When calling a method, it is currently only possible to send one argument. If you want to send multiple values, use an object.
#Use
##Create method (server)
methods
is a global variable. Use methods.add
to add methods.
methods.add({
methodName : function(data){
// do something
},
methodName2 : someFunction
})
##Call Method (client)
methods
is a global variable. Use methods.call
to call a method.
method.call(methodName, data, callBack())
Example
method.call("methodName", {data: "some data"}, function(error, result){
// do something
})
Contributing to Silk
Building Apps
- Getting Started
- [window.json](https://github.com/zodern/Silk/wiki/Window .json)
Using Silk