<p dir="auto">What is the way to translate document title in angular 2.<br>
I can change document title with <code class="notranslate">Title</code> service but how can I translate it?<br>
Angular 2 supports translations only in component templates with <code class="notranslate">i18n</code> directive. I cannot use it in <code class="notranslate">head</code> of html document because it is outside of angular compiler scope.</p>
<blockquote>
<p dir="auto">ng2-quickstart@1.0.1 start E:\portal\ng2-webpack-aot<br>
webpack-dev-server --progress --inline --hot</p>
</blockquote>
<p dir="auto">keywords if/then/else require v5 option<br>
10% building modules 3/3 modules 0 active <a href="http://127.0.0.1:8010/" rel="nofollow">http://127.0.0.1:8010/</a><br>
webpack result is served from <a href="http://127.0.0.1:8010/" rel="nofollow">http://127.0.0.1:8010/</a><br>
404s will fallback to /index.html<br>
chunk    {0} 0.chunk.js 4.55 kB {2} [rendered]<br>
chunk    {1} 1.chunk.js 4.55 kB {2} [rendered]<br>
chunk    {2} app.js, app.css (app) 2.7 MB {3} [initial] [rendered]<br>
chunk    {3} vendor.js (vendor) 67 bytes {4} [initial] [rendered]<br>
chunk    {4} polyfills.js (polyfills) 496 kB [entry] [rendered]</p>
<p dir="auto">WARNING in ./~/.2.4.1@@angular/core/src/linker/system_js_ng_module_factory_loader.js<br>
69:15 Critical dependency: the request of a dependency is an expression</p>
<p dir="auto">WARNING in ./~/.2.4.1@@angular/core/src/linker/system_js_ng_module_factory_loader.js<br>
85:15 Critical dependency: the request of a dependency is an expression</p>
<p dir="auto">ERROR in [default] E:\portal\ng2-webpack-aot\node_modules.0.5.0@<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/types/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/types">@types</a>\source-map\index.d.ts:7:20<br>
Duplicate identifier 'sourceMap'.</p>
<p dir="auto">ERROR in [default] E:\portal\ng2-webpack-aot\node_modules@types\source-map\index.d.ts:7:20<br>
Duplicate identifier 'sourceMap'.<br>
Child html-webpack-plugin for "index.html":<br>
chunk    {0} index.html 304 bytes [entry] [rendered]<br>
Child extract-text-webpack-plugin:<br>
chunk    {0} extract-text-webpack-plugin-output-filename 1.73 kB [entry] [rendered]<br>
webpack: bundle is now VALID.</p>
<p dir="auto">package.json</p>
<p dir="auto">{<br>
"name": "ng2-quickstart",<br>
"description": "angular2 quickstart project",<br>
"version": "1.0.1",<br>
"scripts": {<br>
"serverstart":"npm run build &amp;&amp; npm run serve",<br>
"serve": "http-server ./dist -a 0.0.0.0 -p 9000",<br>
"prestart": "cross-env NODE_ENV=dev",<br>
"start": "webpack-dev-server --progress --inline --hot",<br>
"prebuild": "rimraf dist",<br>
"build": "cross-env NODE_ENV=prod webpack --progress"<br>
},<br>
"dependencies": {<br>
"@angular/common": "2.4.1",<br>
"@angular/compiler": "2.4.1",<br>
"@angular/core": "2.4.1",<br>
"@angular/forms": "2.4.1",<br>
"@angular/http": "2.4.1",<br>
"@angular/platform-browser": "2.4.1",<br>
"@angular/platform-browser-dynamic": "2.4.1",<br>
"@angular/router": "3.4.1",<br>
"angular2-cookie": "1.2.6",<br>
"core-js": "2.4.1",<br>
"rxjs": "5.0.1",<br>
"zone.js": "0.7.4"<br>
},<br>
"devDependencies": {<br>
"@angularclass/hmr": "1.2.2",<br>
"@angularclass/hmr-loader": "3.0.2",<br>
"angular2-router-loader": "0.3.4",<br>
"@angular/compiler-cli": "2.4.1",<br>
"@angular/platform-server": "2.4.1",<br>
"@ngtools/webpack": "1.2.1",<br>
"@types/core-js": "0.9.35",<br>
"@types/jasmine": "2.5.40",<br>
"@types/node": "6.0.40",<br>
"@types/webpack": "1.12.35",<br>
"reflect-metadata": "0.1.9",<br>
"angular2-template-loader": "0.4.0",<br>
"awesome-typescript-loader": "2.2.4",<br>
"cross-env": "3.1.3",<br>
"css-loader": "0.25.0",<br>
"extract-text-webpack-plugin": "2.0.0-beta.3",<br>
"file-loader": "0.8.5",<br>
"html-loader": "0.4.4",<br>
"html-webpack-plugin": "2.15.0",<br>
"node-sass": "3.13.1",<br>
"raw-loader": "0.5.1",<br>
"postcss-loader": "0.11.1",<br>
"resolve-url-loader": "1.6.0",<br>
"rimraf": "2.5.2",<br>
"style-loader": "0.13.1",<br>
"ts-loader": "0.8.1",<br>
"typescript": "2.0.3",<br>
"webpack": "2.1.0-beta.26",<br>
"webpack-dev-server": "2.1.0-beta.10",<br>
"webpack-merge": "0.14.0"<br>
}<br>
}</p>
<p dir="auto">tsconfig.json</p>
<p dir="auto">{<br>
"compilerOptions": {<br>
"target": "es5",<br>
"module": "commonjs",<br>
"moduleResolution": "node",<br>
"sourceMap": false,<br>
"emitDecoratorMetadata": true,<br>
"experimentalDecorators": true,<br>
"removeComments": true,<br>
"noImplicitAny": true,<br>
"suppressImplicitAnyIndexErrors": true,<br>
"typeRoots": [<br>
"node_modules/<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/types/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/types">@types</a>"<br>
]<br>
},<br>
"exclude": [<br>
"node_modules",<br>
"dist"<br>
],<br>
"angularCompilerOptions": {<br>
"skipMetadataEmit": true,<br>
"genDir": "./ngFactory"<br>
}<br>
}</p>