From cc9f1fdf38bb179166212382b33e78255e669e73 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 21 Apr 2011 16:32:05 -0700 Subject: Proper handling of special attributes in jqlite --- src/Angular.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/Angular.js') diff --git a/src/Angular.js b/src/Angular.js index de6f2e5b..7249fb69 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -412,6 +412,19 @@ function isElement(node) { || (node.bind && node.find)); // we have a bind and find method part of jQuery API } +/** + * @param str 'key1,key2,...' + * @returns {object} in the form of {key1:true, key2:true, ...} + */ +function makeMap(str){ + var obj = {}, items = str.split(","), i; + for ( i = 0; i < items.length; i++ ) + obj[ items[i] ] = true; + return obj; +} + + + /** * HTML class which is the only class which can be used in ng:bind to inline HTML for security reasons. * @constructor -- cgit v1.2.3