(scope, directiveName, isController)
| 7369 | var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/; |
| 7370 | |
| 7371 | function parseIsolateBindings(scope, directiveName, isController) { |
| 7372 | var LOCAL_REGEXP = /^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/; |
| 7373 | |
| 7374 | var bindings = {}; |
| 7375 | |
| 7376 | forEach(scope, function(definition, scopeName) { |
| 7377 | var match = definition.match(LOCAL_REGEXP); |
| 7378 | |
| 7379 | if (!match) { |
| 7380 | throw $compileMinErr('iscp', |
| 7381 | "Invalid {3} for directive '{0}'." + |
| 7382 | " Definition: {... {1}: '{2}' ...}", |
| 7383 | directiveName, scopeName, definition, |
| 7384 | (isController ? "controller bindings definition" : |
| 7385 | "isolate scope definition")); |
| 7386 | } |
| 7387 | |
| 7388 | bindings[scopeName] = { |
| 7389 | mode: match[1][0], |
| 7390 | collection: match[2] === '*', |
| 7391 | optional: match[3] === '?', |
| 7392 | attrName: match[4] || scopeName |
| 7393 | }; |
| 7394 | }); |
| 7395 | |
| 7396 | return bindings; |
| 7397 | } |
| 7398 | |
| 7399 | function parseDirectiveBindings(directive, directiveName) { |
| 7400 | var bindings = { |
no test coverage detected