Ich verwende Angular2 und Pre-Compiling-Code mit AOT.Angular2 - Kompilieren zu AOT mit absoluten Pfad in der Komponente templateUrl
Ich bin in der Lage, Code zu kompilieren, wenn ich relativen Pfad in Components TemplateUrl verwende.
Aber Kompilierung fehlschlägt, wenn die Verwendung von absolutem Pfad in der Komponente templateUrl
Compilation Befehl: "node_modules/.bin/ngc" -p tsconfig-aot.json
ich unten Störung erhalten, während absolute templateUrl mit:
Error: Compilation failed. Resource file not found: {Absolute htmlUrl path} at ModuleResolutionHostAdapter.readResource (C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler-cli\src\compiler_host.js:291:19) at CompilerHost.loadResource (C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler-cli\src\compiler_host.js:230:85) at Object.get (C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler\bundles\compiler.umd.js:26374:111) at DirectiveNormalizer._fetch (C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler\bundles\compiler.umd.js:13753:47) at DirectiveNormalizer.normalizeTemplateAsync (C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler\bundles\compiler.umd.js:13799:25) at DirectiveNormalizer.normalizeTemplate (C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler\bundles\compiler.umd.js:13771:48) at CompileMetadataResolver._loadDirectiveMetadata (C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler\bundles\compiler.umd.js:18074:79) at C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler\bundles\compiler.umd.js:18250:58 at Array.forEach (native) at CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata (C:\Dipendra\stash-workspace\angular2Aot\WebContent\node_modules\@angular\compiler\bundles\compiler.umd.js:18249:45) Compilation failed