From 5c7224eb56801b22848470a50b50398bc06cc1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Fri, 22 Oct 2021 14:44:54 +0200 Subject: [PATCH] Angular: Fix for paths with interpolation --- public/app/angular/AngularApp.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/app/angular/AngularApp.ts b/public/app/angular/AngularApp.ts index ffa585766dc..2f45a909196 100644 --- a/public/app/angular/AngularApp.ts +++ b/public/app/angular/AngularApp.ts @@ -103,6 +103,12 @@ export class AngularApp { } bootstrap() { + // Do not initalize angular when the path contains an interpolation directive + const { pathname } = window.location; + if (pathname && (pathname.includes('%7B%7B') || pathname.includes('{{'))) { + return; + } + const injector = angular.bootstrap(document, this.ngModuleDependencies); monkeyPatchInjectorWithPreAssignedBindings(injector);