(scope, directiveName)
| 6415 | var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/; |
| 6416 | |
| 6417 | function parseIsolateBindings(scope, directiveName) { |
| 6418 | var LOCAL_REGEXP = /^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/; |
| 6419 | |
| 6420 | var bindings = {}; |
| 6421 | |
| 6422 | forEach(scope, function(definition, scopeName) { |
| 6423 | var match = definition.match(LOCAL_REGEXP); |
| 6424 | |
| 6425 | if (!match) { |
| 6426 | throw $compileMinErr('iscp', |
| 6427 | "Invalid isolate scope definition for directive '{0}'." + |
| 6428 | " Definition: {... {1}: '{2}' ...}", |
| 6429 | directiveName, scopeName, definition); |
| 6430 | } |
| 6431 | |
| 6432 | bindings[scopeName] = { |
| 6433 | mode: match[1][0], |
| 6434 | collection: match[2] === '*', |
| 6435 | optional: match[3] === '?', |
| 6436 | attrName: match[4] || scopeName |
| 6437 | }; |
| 6438 | }); |
| 6439 | |
| 6440 | return bindings; |
| 6441 | } |
| 6442 | |
| 6443 | /** |
| 6444 | * @ngdoc method |
no test coverage detected