Ng: различия между версиями

Материал из wiki.nntc.nnov.ru
Перейти к навигации Перейти к поиску
(Новая страница: «=NG= fixme... ==Prep...== npm install -g @angular/cli ==Create new SPA angular app== CMD: ng new my-super-app NOT CMD: ? Would you like to add Angular…»)
 
Строка 17: Строка 17:
 
  ? Would you like to add Angular routing? Yes
 
  ? Would you like to add Angular routing? Yes
 
  ? Which stylesheet format would you like to use? SCSS
 
  ? Which stylesheet format would you like to use? SCSS
 +
 +
==Add i18n==
 +
 +
CMD:
 +
 +
npm install --save-deps @angular/localize ngx-i18nsupport
 +
 +
NOT CMD:
 +
 +
[1] In file
 +
 +
package.json
 +
 +
in section
 +
 +
scripts
 +
 +
change build script as:
 +
 +
"build": "ng build --configuration=production,ru --localize",
 +
 +
[2] In file
 +
 +
angular.json
 +
 +
in setion
 +
 +
projects.my-super-app.architect.build.options
 +
 +
add before section
 +
 +
outputPath
 +
 +
this section:
 +
 +
"localize": ["en"],

Версия 19:35, 10 октября 2021

NG

fixme...

Prep...

npm install -g @angular/cli

Create new SPA angular app

CMD:

ng new my-super-app

NOT CMD:

? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS

Add i18n

CMD:

npm install --save-deps @angular/localize ngx-i18nsupport

NOT CMD:

[1] In file

package.json

in section

scripts

change build script as:

"build": "ng build --configuration=production,ru --localize",

[2] In file

angular.json

in setion

projects.my-super-app.architect.build.options

add before section

outputPath

this section:

"localize": ["en"],