aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 850fe34c..32e3ccf7 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -293,13 +293,18 @@ function escapeAttr(html) {
function bind(_this, _function) {
var curryArgs = slice.call(arguments, 2, arguments.length);
- return curryArgs.length == 0 ?
- function() {
- return _function.apply(_this, arguments);
- } :
- function() {
- return _function.apply(_this, curryArgs.concat(slice.call(arguments, 0, arguments.length)));
- };
+ if (typeof _function == 'function') {
+ return curryArgs.length == 0 ?
+ function() {
+ return _function.apply(_this, arguments);
+ } :
+ function() {
+ return _function.apply(_this, curryArgs.concat(slice.call(arguments, 0, arguments.length)));
+ }
+ } else {
+ // in IE, native methonds ore not functions and so they can not be bound (but they don't need to be)
+ return function(a, b, c, d, e){ return _function(a, b, c, d, e); };
+ }
}
function outerHTML(node) {