(scope, directiveName)
| 6493 | var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/; |
| 6494 | |
| 6495 | function parseIsolateBindings(scope, directiveName) { |
| 6496 | var LOCAL_REGEXP = /^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/; |
| 6497 | |
| 6498 | var bindings = {}; |
| 6499 | |
| 6500 | forEach(scope, function(definition, scopeName) { |
| 6501 | var match = definition.match(LOCAL_REGEXP); |
| 6502 | |
| 6503 | if (!match) { |
| 6504 | throw $compileMinErr('iscp', |
| 6505 | "Invalid isolate scope definition for directive '{0}'." + |
| 6506 | " Definition: {... {1}: '{2}' ...}", |
| 6507 | directiveName, scopeName, definition); |
| 6508 | } |
| 6509 | |
| 6510 | bindings[scopeName] = { |
| 6511 | mode: match[1][0], |
| 6512 | collection: match[2] === '*', |
| 6513 | optional: match[3] === '?', |
| 6514 | attrName: match[4] || scopeName |
| 6515 | }; |
| 6516 | }); |
| 6517 | |
| 6518 | return bindings; |
| 6519 | } |
| 6520 | |
| 6521 | /** |
| 6522 | * @ngdoc method |
no test coverage detected