How to use the @angular/compiler.templateVisitAll function in @angular/compiler

To help you get started, we’ve selected a few @angular/compiler 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 / packages / language-service / src / expression_diagnostics.ts View on Github external
visitDirective(ast: DirectiveAst, context: any): any {
    // Override the default child visitor to ignore the host properties of a directive.
    if (ast.inputs && ast.inputs.length) {
      templateVisitAll(this, ast.inputs, context);
    }
  }
github daviddbarrero / Ionic-4-firebase / node_modules / @angular / compiler-cli / src / diagnostics / expression_diagnostics.js View on Github external
function getTemplateExpressionDiagnostics(info) {
    var visitor = new ExpressionDiagnosticsVisitor(info, function (path, includeEvent) {
        return getExpressionScope(info, path, includeEvent);
    });
    compiler_1.templateVisitAll(visitor, info.templateAst);
    return visitor.diagnostics;
}
exports.getTemplateExpressionDiagnostics = getTemplateExpressionDiagnostics;
github VadimDez / ng2-pdf-viewer / build / lib / @angular / compiler-cli / src / diagnostics / expression_diagnostics.js View on Github external
function getTemplateExpressionDiagnostics(info) {
    var visitor = new ExpressionDiagnosticsVisitor(info, function (path, includeEvent) {
        return getExpressionScope(info, path, includeEvent);
    });
    compiler_1.templateVisitAll(visitor, info.templateAst);
    return visitor.diagnostics;
}
exports.getTemplateExpressionDiagnostics = getTemplateExpressionDiagnostics;
github VadimDez / ng2-pdf-viewer / build / lib / @angular / compiler-cli / src / diagnostics / expression_diagnostics.js View on Github external
var visitor = new (function (_super) {
        __extends(class_1, _super);
        function class_1() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        class_1.prototype.visitEmbeddedTemplate = function (ast, context) {
            _super.prototype.visitEmbeddedTemplate.call(this, ast, context);
            processReferences(ast.references);
        };
        class_1.prototype.visitElement = function (ast, context) {
            _super.prototype.visitElement.call(this, ast, context);
            processReferences(ast.references);
        };
        return class_1;
    }(compiler_1.RecursiveTemplateAstVisitor));
    compiler_1.templateVisitAll(visitor, info.templateAst);
    return result;
}
function getDefintionOf(info, ast) {
github angular / angular / packages / language-service / src / expression_diagnostics.ts View on Github external
export function getTemplateExpressionDiagnostics(info: DiagnosticTemplateInfo): Diagnostic[] {
  const visitor = new ExpressionDiagnosticsVisitor(
      info, (path: TemplateAstPath, includeEvent: boolean) =>
                getExpressionScope(info, path, includeEvent));
  templateVisitAll(visitor, info.templateAst);
  return visitor.diagnostics;
}
github johandb / svg-drawing-tool / node_modules / @angular / compiler-cli / src / diagnostics / expression_diagnostics.js View on Github external
var visitor = new /** @class */ (function (_super) {
            tslib_1.__extends(class_1, _super);
            function class_1() {
                return _super !== null && _super.apply(this, arguments) || this;
            }
            class_1.prototype.visitEmbeddedTemplate = function (ast, context) {
                _super.prototype.visitEmbeddedTemplate.call(this, ast, context);
                processReferences(ast.references);
            };
            class_1.prototype.visitElement = function (ast, context) {
                _super.prototype.visitElement.call(this, ast, context);
                processReferences(ast.references);
            };
            return class_1;
        }(compiler_1.RecursiveTemplateAstVisitor));
        compiler_1.templateVisitAll(visitor, info.templateAst);
        return result;
    }
    function getDefinitionOf(info, ast) {
github angular / angular / modules / @angular / language-service / src / template_path.ts View on Github external
function visit(children: T[] | undefined) {
      if (children && children.length) results.push(templateVisitAll(visitor, children, context));
    }
    cb(visit);
github daviddbarrero / Ionic-4-firebase / node_modules / @angular / compiler-cli / src / diagnostics / expression_diagnostics.js View on Github external
var visitor = new (function (_super) {
        __extends(class_1, _super);
        function class_1() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        class_1.prototype.visitEmbeddedTemplate = function (ast, context) {
            _super.prototype.visitEmbeddedTemplate.call(this, ast, context);
            processReferences(ast.references);
        };
        class_1.prototype.visitElement = function (ast, context) {
            _super.prototype.visitElement.call(this, ast, context);
            processReferences(ast.references);
        };
        return class_1;
    }(compiler_1.RecursiveTemplateAstVisitor));
    compiler_1.templateVisitAll(visitor, info.templateAst);
    return result;
}
function getDefinitionOf(info, ast) {
github fossasia / susper.com / node_modules / codelyzer / angular / ng2Walker.js View on Github external
Ng2Walker.prototype.visitNg2TemplateHelper = function (roots, context, baseStart) {
        var _this = this;
        if (!roots || !roots.length) {
            return;
        }
        else {
            var sourceFile = this.getContextSourceFile(context.template.url, context.template.template.source);
            var referenceVisitor = new referenceCollectorVisitor_1.ReferenceCollectorVisitor();
            var visitor = new this._config.templateVisitorCtrl(sourceFile, this._originalOptions, context, baseStart, this._config.expressionVisitorCtrl);
            compiler.templateVisitAll(referenceVisitor, roots, null);
            visitor._variables = referenceVisitor.variables;
            compiler.templateVisitAll(visitor, roots, context.controller);
            visitor.getFailures().forEach(function (f) { return _this.addFailure(f); });
        }
    };
    Ng2Walker.prototype.visitNg2StyleHelper = function (style, context, styleMetadata, baseStart) {