什么是“<”分离结合手段

时间:2016-04-19 06:30:25

标签: javascript angularjs

我最近遇到了以下“<”隔离源代码中的绑定:

switch (mode) {

case '@':
...
case '=':
...
case '&':
...

case '<':
    if (!hasOwnProperty.call(attrs, attrName)) {
      if (optional) break;
      attrs[attrName] = void 0;
    }
    if (optional && !attrs[attrName]) break;

    parentGet = $parse(attrs[attrName]);

    destination[scopeName] = parentGet(scope);
    initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]);

    removeWatch = scope.$watch(parentGet, function parentValueWatchAction(newValue, oldValue) {
      if (newValue === oldValue) {
        // If the new and old values are identical then this is the first time the watch has been triggered
        // So instead we use the current value on the destination as the old value
        oldValue = destination[scopeName];
      }
      recordChanges(scopeName, newValue, oldValue);
      destination[scopeName] = newValue;
    }, parentGet.literal);

    removeWatchCollection.push(removeWatch);
    break;

Angular docs只提到前三个,这个“&lt;”的目的是什么?

0 个答案:

没有答案