Could someone clarify the distinction between declaring these two functions in an angular controller?
function demo() {
};
scope.demo = function() {
};
Are these two functions similar in performance, or is one option better than the other?
I am aware of one difference: a watch can be applied to a function that is in scope, which means an angular directive or element cannot call a JavaScript function directly.