(scope, directiveName, isController)
| 6835 | var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/; |
| 6836 | |
| 6837 | function parseIsolateBindings(scope, directiveName, isController) { |
| 6838 | var LOCAL_REGEXP = /^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/; |
| 6839 | |
| 6840 | var bindings = {}; |
| 6841 | |
| 6842 | forEach(scope, function(definition, scopeName) { |
| 6843 | var match = definition.match(LOCAL_REGEXP); |
| 6844 | |
| 6845 | if (!match) { |
| 6846 | throw $compileMinErr('iscp', |
| 6847 | "Invalid {3} for directive '{0}'." + |
| 6848 | " Definition: {... {1}: '{2}' ...}", |
| 6849 | directiveName, scopeName, definition, |
| 6850 | (isController ? "controller bindings definition" : |
| 6851 | "isolate scope definition")); |
| 6852 | } |
| 6853 | |
| 6854 | bindings[scopeName] = { |
| 6855 | mode: match[1][0], |
| 6856 | collection: match[2] === '*', |
| 6857 | optional: match[3] === '?', |
| 6858 | attrName: match[4] || scopeName |
| 6859 | }; |
| 6860 | }); |
| 6861 | |
| 6862 | return bindings; |
| 6863 | } |
| 6864 | |
| 6865 | function parseDirectiveBindings(directive, directiveName) { |
| 6866 | var bindings = { |
no test coverage detected