Skip to main content

Scope

Scope

Overview

Add new Transloco scope to a new/existing Angular module, and create the scope's translation files.

Command

ng generate @jsverse/transloco:scope [name]

Options

Define the name of the new scope.

  • --name

type: string

Define the path at which module to add scope to, relative to the workspace root.

Note if this flag won't be provide a new Module should be created.

  • --module

type: string

Define the languages of the scope, default is the root languages.

  • --langs

type: string

alias: la

Skip the creation of the translation files.

  • --skip-creation

type: boolean

Define the format of the translation files.

  • --translate-type

type: string

default: JSON

Define the location of the translation files.

  • --translation-path

type: string

Examples

ng g @jsverse/transloco:scope my-scope
ng g @jsverse/transloco:scope my-scope --module path/to/my-scope
ng g @jsverse/transloco:scope my-scope --inline-loader