From a7ede193fdc398e71f590557afa7c6f9fd240d61 Mon Sep 17 00:00:00 2001 From: Wannes Gennar Date: Tue, 9 Jan 2018 15:35:43 +0100 Subject: [PATCH] fix(@ngtools/webpack): allow # in paths Fix #9100 --- packages/@ngtools/webpack/src/angular_compiler_plugin.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/@ngtools/webpack/src/angular_compiler_plugin.ts b/packages/@ngtools/webpack/src/angular_compiler_plugin.ts index 0969344a2f5c..80deb60fb00b 100644 --- a/packages/@ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/@ngtools/webpack/src/angular_compiler_plugin.ts @@ -134,9 +134,13 @@ export class AngularCompilerPlugin implements Tapable { if (!this._entryModule) { return undefined; } - const splitted = this._entryModule.split('#'); + const splitted = this._entryModule.split(/(#[a-zA-Z]+)/); const path = splitted[0]; - const className = splitted[1] || 'default'; + let className = splitted[1] || 'default'; + if (splitted.length >= 3) { + className = splitted[splitted.length - 2]; + } + return { path, className }; }