How to use the angular2/src/facade/collection.ListWrapper.createFixedSize 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 grafana / grafana / public / vendor / npm / angular2 / es6 / dev / src / core / change_detection / proto_change_detector.js View on Github external
_visitAll(asts) {
        var res = ListWrapper.createFixedSize(asts.length);
        for (var i = 0; i < asts.length; ++i) {
            res[i] = asts[i].visit(this);
        }
        return res;
    }
    /**
github angular / angular / modules / angular2 / src / core / change_detection / parser / parser.ts View on Github external
visitAll(asts: any[]): any[] {
    var res = ListWrapper.createFixedSize(asts.length);
    for (var i = 0; i < asts.length; ++i) {
      res[i] = asts[i].visit(this);
    }
    return res;
  }
github appbaseio / mirage / node_modules / angular2 / es6 / dev / src / core / change_detection / parser / parser.js View on Github external
visitAll(asts) {
        var res = ListWrapper.createFixedSize(asts.length);
        for (var i = 0; i < asts.length; ++i) {
            res[i] = asts[i].visit(this);
        }
        return res;
    }
    visitChain(ast) { this.simple = false; }
github grafana / grafana / public / vendor / npm / angular2 / es6 / prod / src / core / render / view.js View on Github external
hydrate() {
        if (this.hydrated)
            throw new BaseException('The view is already hydrated.');
        this.hydrated = true;
        this.globalEventRemovers = ListWrapper.createFixedSize(this.globalEventAdders.length);
        for (var i = 0; i < this.globalEventAdders.length; i++) {
            this.globalEventRemovers[i] = this.globalEventAdders[i]();
        }
    }
    dehydrate() {
github grafana / grafana / public / vendor / npm / angular2 / es6 / dev / src / core / change_detection / codegen_name_util.js View on Github external
constructor(_records, _eventBindings, _directiveRecords, _utilName) {
        this._records = _records;
        this._eventBindings = _eventBindings;
        this._directiveRecords = _directiveRecords;
        this._utilName = _utilName;
        /** @internal */
        this._sanitizedEventNames = new Map();
        this._sanitizedNames = ListWrapper.createFixedSize(this._records.length + 1);
        this._sanitizedNames[CONTEXT_INDEX] = CONTEXT_ACCESSOR;
        for (var i = 0, iLen = this._records.length; i < iLen; ++i) {
            this._sanitizedNames[i + 1] = sanitizeName(`${this._records[i].name}${i}`);
        }
        for (var ebIndex = 0; ebIndex < _eventBindings.length; ++ebIndex) {
            var eb = _eventBindings[ebIndex];
            var names = [CONTEXT_ACCESSOR];
            for (var i = 0, iLen = eb.records.length; i < iLen; ++i) {
                names.push(sanitizeName(`${eb.records[i].name}${i}_${ebIndex}`));
            }
            this._sanitizedEventNames.set(eb, names);
        }
    }
    /** @internal */
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / es6 / dev / src / core / di / injector.js View on Github external
_instantiateProvider(provider, visibility) {
        if (provider.multiProvider) {
            var res = ListWrapper.createFixedSize(provider.resolvedFactories.length);
            for (var i = 0; i < provider.resolvedFactories.length; ++i) {
                res[i] = this._instantiate(provider, provider.resolvedFactories[i], visibility);
            }
            return res;
        }
        else {
            return this._instantiate(provider, provider.resolvedFactories[0], visibility);
        }
    }
    _instantiate(provider, resolvedFactory, visibility) {
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / es6 / prod / src / core / change_detection / dynamic_change_detector.js View on Github external
_processEventBinding(eb, locals) {
        var values = ListWrapper.createFixedSize(eb.records.length);
        values[0] = this.values[0];
        for (var protoIdx = 0; protoIdx < eb.records.length; ++protoIdx) {
            var proto = eb.records[protoIdx];
            if (proto.isSkipRecord()) {
                protoIdx += this._computeSkipLength(protoIdx, proto, values);
            }
            else {
                if (proto.lastInBinding) {
                    this._markPathAsCheckOnce(proto);
                }
                var res = this._calculateCurrValue(proto, values, locals);
                if (proto.lastInBinding) {
                    return res;
                }
                else {
                    this._writeSelf(proto, res, values);
github angular / angular / modules / angular2 / src / core / change_detection / coalesce.ts View on Github external
export function coalesce(srcRecords: ProtoRecord[]): ProtoRecord[] {
  let dstRecords = [];
  let excludedIdxs = [];
  let indexMap: Map = new Map();
  let skipDepth = 0;
  let skipSources: ProtoRecord[] = ListWrapper.createFixedSize(srcRecords.length);

  for (let protoIndex = 0; protoIndex < srcRecords.length; protoIndex++) {
    let skipRecord = skipSources[protoIndex];
    if (isPresent(skipRecord)) {
      skipDepth--;
      skipRecord.fixedArgs[0] = dstRecords.length;
    }

    let src = srcRecords[protoIndex];
    let dst = _cloneAndUpdateIndexes(src, dstRecords, indexMap);

    if (dst.isSkipRecord()) {
      dstRecords.push(dst);
      skipDepth++;
      skipSources[dst.fixedArgs[0]] = dst;
    } else {
github FuelInteractive / fuel-ui / node_modules / angular2 / es6 / dev / src / platform / browser / browser_adapter.js View on Github external
childNodesAsList(el) {
        var childNodes = el.childNodes;
        var res = ListWrapper.createFixedSize(childNodes.length);
        for (var i = 0; i < childNodes.length; i++) {
            res[i] = childNodes[i];
        }
        return res;
    }
    clearNodes(el) {
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / es6 / dev / src / compiler / view_compiler.js View on Github external
constructor(renderNode, appEl, component) {
        this.renderNode = renderNode;
        this.appEl = appEl;
        this.component = component;
        if (isPresent(component)) {
            this.contentNodesByNgContentIndex =
                ListWrapper.createFixedSize(component.template.ngContentSelectors.length);
            for (var i = 0; i < this.contentNodesByNgContentIndex.length; i++) {
                this.contentNodesByNgContentIndex[i] = [];
            }
        }
        else {
            this.contentNodesByNgContentIndex = null;
        }
    }
    addContentNode(ngContentIndex, nodeExpr) {