Fetch dictionary data with the JSS REST Dictionary Service
Version:
To invoke the REST Dictionary Service from a JSS application, use the JSS RestDictionaryService:
Note
This example assumes you create the files in the /src directory of the project, and that you have a config.js file or config.ts file in the /src/temp directory. Adjust the import statements as necessary to reflect your project's setup.
To fetch dictionary data with the JSS REST Dictionary Service:
-
In a new
dictionary-service.tsfile, create an instance of theRestDictionaryServiceclass and provide the configuration object: -
In the file where you want to fetch the data, import and use your new dictionary service instance: