I have a hub server method called with signalr many times. I know i can do:
hub.server.method().done(function(data){
//my_code
}
but is there any way I can set a 'default' done() function so I don't have to repeat it every time I call that method?
Create a function in your *.js file like this
And then call doSomething instead of
Edited:
If you want to add a function to the server object you can do: