Imagine having a server that sends back a response in the form of:
{
multiply:function(x,y) {
return x*y;
},
divide:function(x,y) {
return x/y;
}
}
Can this be converted into a functional method?
I attempted to convert it using:
$parse(element.Content) // Content represents the response string
however, I received the error:
Token '{' is an unexpected token
My goal is to achieve something like:
elementFunctions = $parse(element.Content)