diff options
Diffstat (limited to 'src/ng/parse.js')
| -rw-r--r-- | src/ng/parse.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/ng/parse.js b/src/ng/parse.js index 86ac8806..1a2d10c4 100644 --- a/src/ng/parse.js +++ b/src/ng/parse.js @@ -663,33 +663,6 @@ function setter(obj, path, setValue) { return setValue; } -/** - * Return the value accesible from the object by path. Any undefined traversals are ignored - * @param {Object} obj starting object - * @param {string} path path to traverse - * @param {boolean=true} bindFnToScope - * @returns value as accesbile by path - */ -//TODO(misko): this function needs to be removed -function getter(obj, path, bindFnToScope) { - if (!path) return obj; - var keys = path.split('.'); - var key; - var lastInstance = obj; - var len = keys.length; - - for (var i = 0; i < len; i++) { - key = keys[i]; - if (obj) { - obj = (lastInstance = obj)[key]; - } - } - if (!bindFnToScope && isFunction(obj)) { - return bind(lastInstance, obj); - } - return obj; -} - var getterFnCache = {}; /** |
