I am trying to use the new xi18n in Angular 2 version 2.1.1 . When I run the ./node_modules/.bin/ng-xi18n
command to extract the locales I hit on this error:
Error: Compilation failed. Resource file not found: C:/Projects/SellPro/javaSolution/branches/work/webapp/sellPro/app/ts/templates/app.component.html at Object.get (C:\Projects\SellPro\javaSolution\branches\work\webapp\sellPro\node_modules\@angular\compiler-cli\src\extract_i18n.js:13:23) at DirectiveNormalizer._fetch (C:\Projects\SellPro\javaSolution\branches\work\webapp\sellPro\node_modules\@angular\compiler\bundles\compiler.umd.js:13661:45) at DirectiveNormalizer.normalizeTemplateAsync (C:\Projects\SellPro\javaSolution\branches\work\webapp\sellPro\node_modules\@angular\compiler\bundles\compiler.umd.js:13707:23) at DirectiveNormalizer.normalizeDirective (C:\Projects\SellPro\javaSolution\branches\work\webapp\sellPro\node_modules\@angular\compiler\bundles\compiler.umd.js:13681:46) at C:\Projects\SellPro\javaSolution\branches\work\webapp\sellPro\node_modules\@angular\compiler-cli\src\extractor.js:45:64 at Array.forEach (native) at C:\Projects\SellPro\javaSolution\branches\work\webapp\sellPro\node_modules\@angular\compiler-cli\src\extractor.js:40:29 at Array.forEach (native) at Extractor.extract (C:\Projects\SellPro\javaSolution\branches\work\webapp\sellPro\node_modules\@angular\compiler-cli\src\extractor.js:38:15) at extract (C:\Projects\SellPro\javaSolution\branches\work\webapp\sellPro\node_modules\@angular\compiler-cli\src\extract_i18n.js:19:35) Extraction failed
Project structure:
My project structure is with separate template folder witch is not inside the ts folder. When I track the error i saw that the urlResolver.resolve method in directive_normalizer.js accepts moduleUrl and templateUrl as params. Is there any way to change that or just point the xi18n to read from the template directory?