How to use the angular2/src/facade/collection.ListWrapper 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 sebastianhaas / medical-appointment-scheduling / src / .ng2-patch / angular2 / src / compiler / template_compiler.js View on Github external
TemplateCompiler.prototype._compileNestedComponentRuntime = function (childComponentDir, parentCompilingComponentsPath, childPromises) {
        var compilingComponentsPath = collection_1.ListWrapper.clone(parentCompilingComponentsPath);
        var childCacheKey = childComponentDir.type.runtime;
        var childViewDirectives = this._runtimeMetadataResolver.getViewDirectivesMetadata(childComponentDir.type.runtime);
        var childViewPipes = this._runtimeMetadataResolver.getViewPipesMetadata(childComponentDir.type.runtime);
        var childIsRecursive = collection_1.ListWrapper.contains(compilingComponentsPath, childCacheKey);
        this._compileComponentRuntime(childCacheKey, childComponentDir, childViewDirectives, childViewPipes, compilingComponentsPath);
        if (!childIsRecursive) {
            // Only wait for a child if it is not a cycle
            childPromises.push(this._compiledTemplateDone.get(childCacheKey));
        }
    };
    TemplateCompiler.prototype._createViewFactoryRuntime = function (compMeta, parsedTemplate, directives, styles, pipes) {
github panacloud / learn-angular / step9_gulp_router / node_modules / angular2 / src / render / dom / shadow_dom / shadow_dom_compile_step.js View on Github external
ShadowDomCompileStep.prototype._processStyleElement = function (current, control) {
        var stylePromise = this._shadowDomStrategy.processStyleElement(this._template.componentId, this._template.templateAbsUrl, current.element);
        if (lang_1.isPresent(stylePromise) && lang_1.isPromise(stylePromise)) {
            collection_1.ListWrapper.push(this._subTaskPromises, stylePromise);
        }
        // Style elements should not be further processed by the compiler, as they can not contain
        // bindings. Skipping further compiler steps allow speeding up the compilation process.
        control.ignoreCurrentElement();
    };
    ShadowDomCompileStep.prototype._processContentElement = function (current) {
github panacloud / learn-angular / step9_gulp_router / node_modules / angular2 / src / change_detection / coalesce.js View on Github external
function _findMatching(r, rs) {
    return collection_1.ListWrapper.find(rs, function (rr) { return rr.mode !== proto_record_1.RecordType.DIRECTIVE_LIFECYCLE &&
        rr.mode === r.mode && rr.funcOrValue === r.funcOrValue &&
        rr.contextIndex === r.contextIndex &&
        collection_1.ListWrapper.equals(rr.args, r.args); });
}
function _replaceIndices(r, selfIndex, indexMap) {
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / src / core / di / injector.js View on Github external
function ProtoInjectorDynamicStrategy(protoInj, bwv) {
        var len = bwv.length;
        this.providers = collection_1.ListWrapper.createFixedSize(len);
        this.keyIds = collection_1.ListWrapper.createFixedSize(len);
        this.visibilities = collection_1.ListWrapper.createFixedSize(len);
        for (var i = 0; i < len; i++) {
            this.providers[i] = bwv[i].provider;
            this.keyIds[i] = bwv[i].getKeyId();
            this.visibilities[i] = bwv[i].visibility;
        }
    }
    ProtoInjectorDynamicStrategy.prototype.getProviderAtIndex = function (index) {
github panacloud / learn-angular / step9_gulp_router / node_modules / angular2 / src / change_detection / parser / ast.js View on Github external
LiteralArray.prototype.eval = function (context, locals) {
        return collection_1.ListWrapper.map(this.expressions, function (e) { return e.eval(context, locals); });
    };
    LiteralArray.prototype.visit = function (visitor) { return visitor.visitLiteralArray(this); };
github FuelInteractive / fuel-ui / node_modules / angular2 / src / core / di / reflective_provider.js View on Github external
if (provider.multiProvider !== existing.multiProvider) {
                throw new reflective_exceptions_1.MixingMultiProvidersWithRegularProvidersError(existing, provider);
            }
            if (provider.multiProvider) {
                for (var j = 0; j < provider.resolvedFactories.length; j++) {
                    existing.resolvedFactories.push(provider.resolvedFactories[j]);
                }
            }
            else {
                normalizedProvidersMap.set(provider.key.id, provider);
            }
        }
        else {
            var resolvedProvider;
            if (provider.multiProvider) {
                resolvedProvider = new ResolvedReflectiveProvider_(provider.key, collection_1.ListWrapper.clone(provider.resolvedFactories), provider.multiProvider);
            }
            else {
                resolvedProvider = provider;
            }
            normalizedProvidersMap.set(provider.key.id, resolvedProvider);
        }
    }
    return normalizedProvidersMap;
}
exports.mergeResolvedReflectiveProviders = mergeResolvedReflectiveProviders;
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / src / core / di / provider.js View on Github external
if (provider.multiProvider !== existing.multiProvider) {
                throw new exceptions_2.MixingMultiProvidersWithRegularProvidersError(existing, provider);
            }
            if (provider.multiProvider) {
                for (var j = 0; j < provider.resolvedFactories.length; j++) {
                    existing.resolvedFactories.push(provider.resolvedFactories[j]);
                }
            }
            else {
                normalizedProvidersMap.set(provider.key.id, provider);
            }
        }
        else {
            var resolvedProvider;
            if (provider.multiProvider) {
                resolvedProvider = new ResolvedProvider_(provider.key, collection_1.ListWrapper.clone(provider.resolvedFactories), provider.multiProvider);
            }
            else {
                resolvedProvider = provider;
            }
            normalizedProvidersMap.set(provider.key.id, resolvedProvider);
        }
    }
    return normalizedProvidersMap;
}
exports.mergeResolvedProviders = mergeResolvedProviders;
github weolopez / BraveHackersSpring2016 / node_modules / angular2 / src / core / application_ref.js View on Github external
    PlatformRef_.prototype._applicationDisposed = function (app) { collection_1.ListWrapper.remove(this._applications, app); };
    return PlatformRef_;
github FuelInteractive / fuel-ui / node_modules / angular2 / src / core / linker / element.js View on Github external
AppElement.prototype.detachView = function (viewIndex) {
        var view = collection_1.ListWrapper.removeAt(this.nestedViews, viewIndex);
        if (view.type === view_type_1.ViewType.COMPONENT) {
            throw new exceptions_1.BaseException("Component views can't be moved!");
        }
        view.renderer.detachView(view.flatRootNodes);
        view.removeFromContentChildren(this);
        return view;
    };
    return AppElement;
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / src / web_workers / shared / service_message_broker.js View on Github external
this._methods.set(methodName, function (message) {
            var serializedArgs = message.args;
            var numArgs = signature === null ? 0 : signature.length;
            var deserializedArgs = collection_1.ListWrapper.createFixedSize(numArgs);
            for (var i = 0; i < numArgs; i++) {
                var serializedArg = serializedArgs[i];
                deserializedArgs[i] = _this._serializer.deserialize(serializedArg, signature[i]);
            }
            var promise = lang_1.FunctionWrapper.apply(method, deserializedArgs);
            if (lang_1.isPresent(returnType) && lang_1.isPresent(promise)) {
                _this._wrapWebWorkerPromise(message.id, promise, returnType);
            }
        });
    };