How to use the angular2/src/facade/lang.stringify 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 tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / src / core / linker / directive_resolver.js View on Github external
dm.outputs.forEach(function (propName) {
                if (collection_1.ListWrapper.contains(outputs, propName)) {
                    throw new exceptions_1.BaseException("Output event '" + propName + "' defined multiple times in '" + lang_1.stringify(directiveType) + "'");
                }
            });
            mergedOutputs = collection_1.ListWrapper.concat(dm.outputs, outputs);
github FuelInteractive / fuel-ui / node_modules / angular2 / es6 / prod / src / core / linker / compiler.js View on Github external
compileInHost(componentType) {
        var metadatas = reflector.annotations(componentType);
        var hostViewFactory = metadatas.find(isHostViewFactory);
        if (isBlank(hostViewFactory)) {
            throw new BaseException(`No precompiled component ${stringify(componentType)} found`);
        }
        return PromiseWrapper.resolve(new HostViewFactoryRef_(hostViewFactory));
    }
    clearCache() { }
github panacloud / learn-angular / step9_gulp_router / node_modules / angular2 / src / change_detection / pipes / keyvalue_changes.js View on Github external
var removals = [];
        var record;
        for (record = this._mapHead; record !== null; record = record._next) {
            collection_1.ListWrapper.push(items, lang_1.stringify(record));
        }
        for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
            collection_1.ListWrapper.push(previous, lang_1.stringify(record));
        }
        for (record = this._changesHead; record !== null; record = record._nextChanged) {
            collection_1.ListWrapper.push(changes, lang_1.stringify(record));
        }
        for (record = this._additionsHead; record !== null; record = record._nextAdded) {
            collection_1.ListWrapper.push(additions, lang_1.stringify(record));
        }
        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
            collection_1.ListWrapper.push(removals, lang_1.stringify(record));
        }
        return "map: " + items.join(', ') + "\n" + "previous: " + previous.join(', ') + "\n" +
            "additions: " + additions.join(', ') + "\n" + "changes: " + changes.join(', ') + "\n" +
            "removals: " + removals.join(', ') + "\n";
    };
    KeyValueChanges.prototype._forEach = function (obj, fn) {
github panacloud / learn-angular / step9_gulp_router / node_modules / angular2 / src / util / decorators.js View on Github external
for (var j = 0; j < annotation.length; j++) {
                    paramAnnotations.push(extractAnnotation(annotation[j]));
                }
            }
            else if (lang_1.isFunction(annotation)) {
                paramAnnotations.push(extractAnnotation(annotation));
            }
            else {
                paramAnnotations.push(annotation);
            }
        }
        Reflect.defineMetadata('parameters', paramsAnnotations, fn);
        return fn;
    }
    else {
        throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + lang_1.stringify(fnOrArray) + "'");
    }
}
function Class(clsDef) {
github appbaseio / mirage / node_modules / angular2 / es6 / prod / src / core / change_detection / differs / default_iterable_differ.js View on Github external
toString() {
        return this.previousIndex === this.currentIndex ?
            stringify(this.item) :
            stringify(this.item) + '[' + stringify(this.previousIndex) + '->' +
                stringify(this.currentIndex) + ']';
    }
}
github panacloud / learn-angular / step9_gulp_router / node_modules / angular2 / src / core / compiler / element_injector.js View on Github external
collection_1.ListWrapper.forEach(dirBinding.resolvedHostInjectables, function (b) {
                if (collection_1.MapWrapper.contains(visitedIds, b.key.id)) {
                    throw new lang_1.BaseException("Multiple directives defined the same host injectable: \"" + lang_1.stringify(b.key.token) + "\"");
                }
                collection_1.MapWrapper.set(visitedIds, b.key.id, true);
                collection_1.ListWrapper.push(bd, ProtoElementInjector._createBindingData(firstBindingIsComponent, dirBinding, dirBindings, ProtoElementInjector._createBinding(b)));
            });
        });
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / src / compiler / runtime_metadata.js View on Github external
RuntimeMetadataResolver.prototype.getPipeMetadata = function (pipeType) {
        var meta = this._pipeCache.get(pipeType);
        if (lang_1.isBlank(meta)) {
            var pipeMeta = this._pipeResolver.resolve(pipeType);
            var moduleUrl = reflection_1.reflector.importUri(pipeType);
            meta = new cpl.CompilePipeMetadata({
                type: new cpl.CompileTypeMetadata({ name: lang_1.stringify(pipeType), moduleUrl: moduleUrl, runtime: pipeType }),
                name: pipeMeta.name,
                pure: pipeMeta.pure
            });
            this._pipeCache.set(pipeType, meta);
        }
        return meta;
    };
    RuntimeMetadataResolver.prototype.getViewDirectivesMetadata = function (component) {
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / src / core / change_detection / differs / default_keyvalue_differ.js View on Github external
KeyValueChangeRecord.prototype.toString = function () {
        return lang_1.looseIdentical(this.previousValue, this.currentValue) ?
            lang_1.stringify(this.key) :
            (lang_1.stringify(this.key) + '[' + lang_1.stringify(this.previousValue) + '->' +
                lang_1.stringify(this.currentValue) + ']');
    };
    return KeyValueChangeRecord;
github FuelInteractive / fuel-ui / node_modules / angular2 / src / core / di / reflective_exceptions.js View on Github external
        var tokenStrs = reversed.map(function (k) { return lang_1.stringify(k.token); });
        return " (" + tokenStrs.join(' -> ') + ")";
github FuelInteractive / fuel-ui / node_modules / angular2 / es6 / dev / src / compiler / view_resolver.js View on Github external
_throwMixingViewAndComponent(propertyName, component) {
        throw new BaseException(`Component '${stringify(component)}' cannot have both '${propertyName}' and '@View' set at the same time"`);
    }
};