How to use the angular2/src/facade/collection.StringMapWrapper.forEach function in angular2

To help you get started, we’ve selected a few angular2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular / angular / modules / angular2 / src / router / router.ts View on Github external
// `instruction` corresponds to the root router
    while (isPresent(router.parent) && isPresent(instruction.child)) {
      router = router.parent;
      instruction = instruction.child;
    }

    if (isBlank(instruction.component) || isBlank(this.currentInstruction.component) ||
        this.currentInstruction.component.routeName != instruction.component.routeName) {
      return false;
    }

    let paramEquals = true;

    if (isPresent(this.currentInstruction.component.params)) {
      StringMapWrapper.forEach(instruction.component.params, (value, key) => {
        if (this.currentInstruction.component.params[key] !== value) {
          paramEquals = false;
        }
      });
    }

    return paramEquals;
  }
github appbaseio / mirage / node_modules / angular2 / es6 / prod / src / compiler / template_parser.js View on Github external
_createDirectivePropertyAsts(directiveProperties, boundProps, targetBoundDirectiveProps) {
        if (isPresent(directiveProperties)) {
            var boundPropsByName = new Map();
            boundProps.forEach(boundProp => {
                var prevValue = boundPropsByName.get(boundProp.name);
                if (isBlank(prevValue) || prevValue.isLiteral) {
                    // give [a]="b" a higher precedence than a="b" on the same element
                    boundPropsByName.set(boundProp.name, boundProp);
                }
            });
            StringMapWrapper.forEach(directiveProperties, (elProp, dirProp) => {
                var boundProp = boundPropsByName.get(elProp);
                // Bindings are optional, so this binding only needs to be set up if an expression is given.
                if (isPresent(boundProp)) {
                    targetBoundDirectiveProps.push(new BoundDirectivePropertyAst(dirProp, boundProp.name, boundProp.expression, boundProp.sourceSpan));
                }
            });
        }
    }
    _createElementPropertyAsts(elementName, props, directives) {
github appbaseio / mirage / node_modules / angular2 / es6 / prod / src / compiler / template_parser.js View on Github external
_createDirectiveHostPropertyAsts(elementName, hostProps, sourceSpan, targetPropertyAsts) {
        if (isPresent(hostProps)) {
            StringMapWrapper.forEach(hostProps, (expression, propName) => {
                var exprAst = this._parseBinding(expression, sourceSpan);
                targetPropertyAsts.push(this._createElementPropertyAst(elementName, propName, exprAst, sourceSpan));
            });
        }
    }
    _createDirectiveHostEventAsts(hostListeners, sourceSpan, targetEventAsts) {
github grafana / grafana / public / vendor / npm / angular2 / es6 / dev / src / compiler / template_parser.js View on Github external
_createDirectiveHostPropertyAsts(elementName, hostProps, sourceSpan, targetPropertyAsts) {
        if (isPresent(hostProps)) {
            StringMapWrapper.forEach(hostProps, (expression, propName) => {
                var exprAst = this._parseBinding(expression, sourceSpan);
                targetPropertyAsts.push(this._createElementPropertyAst(elementName, propName, exprAst, sourceSpan));
            });
        }
    }
    _createDirectiveHostEventAsts(hostListeners, sourceSpan, targetEventAsts) {
github FuelInteractive / fuel-ui / node_modules / angular2 / es6 / prod / src / compiler / template_compiler.js View on Github external
    maps.forEach((map) => { StringMapWrapper.forEach(map, (value, key) => { result[key] = value; }); });
    return result;
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / es6 / dev / src / compiler / template_parser.js View on Github external
_createDirectiveHostPropertyAsts(elementName, hostProps, sourceSpan, targetPropertyAsts) {
        if (isPresent(hostProps)) {
            StringMapWrapper.forEach(hostProps, (expression, propName) => {
                var exprAst = this._parseBinding(expression, sourceSpan);
                targetPropertyAsts.push(this._createElementPropertyAst(elementName, propName, exprAst, sourceSpan));
            });
        }
    }
    _createDirectiveHostEventAsts(hostListeners, sourceSpan, targetEventAsts) {
github panacloud / learn-angular / project9_gulp_router / node_modules / angular2 / atscript / src / reflection / reflector.ts View on Github external
function _mergeMaps(target: Map, config: Map): void {
  StringMapWrapper.forEach(config, (v, k) => MapWrapper.set(target, k, v));
}
github FuelInteractive / fuel-ui / node_modules / angular2 / es6 / dev / src / router / router.js View on Github external
return instruction.resolveComponent().then((_) => {
            var unsettledInstructions = [];
            if (isPresent(instruction.component)) {
                instruction.component.reuse = false;
            }
            if (isPresent(instruction.child)) {
                unsettledInstructions.push(this._settleInstruction(instruction.child));
            }
            StringMapWrapper.forEach(instruction.auxInstruction, (instruction, _) => {
                unsettledInstructions.push(this._settleInstruction(instruction));
            });
            return PromiseWrapper.all(unsettledInstructions);
        });
    }
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / es6 / dev / src / compiler / template_compiler.js View on Github external
    maps.forEach((map) => { StringMapWrapper.forEach(map, (value, key) => { result[key] = value; }); });
    return result;
github angular / angular / modules / angular2 / src / core / reflection / reflector.ts View on Github external
function _mergeMaps(target: Map, config: {[key: string]: Function}): void {
  StringMapWrapper.forEach(config, (v: Function, k: string) => target.set(k, v));
}