0

I angular we have function called angular.bind. Please tell me where should I use this. As I have gone through this example(http://learnkode.com/Examples/Angular/angular-bind) It is possible to do all the examples without angular.bind. So for What purpose we should use angular.bind? (Please dont block my question)

  • 1
    `angular.bind()` has nothing to do with data binding. it is simply an alternative way of calling JavaScript `prototype.bind()`. see https://stackoverflow.com/questions/2236747/use-of-the-javascript-bind-method – Claies Jun 20 '17 at 18:07

1 Answers1

0

Take a look at this post and the response by Davin Tryon. From what he stated angular.bind allows you to attach a function to a scope but execute it at a later time. Personally from the examples from the link you provided it would be much simpler to just attach a function to $scope and access it that way.

Mickers
  • 1,367
  • 1
  • 20
  • 28