當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ConfigService.getSettings方法代碼示例

本文整理匯總了TypeScript中@ngx-config/core.ConfigService.getSettings方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ConfigService.getSettings方法的具體用法?TypeScript ConfigService.getSettings怎麽用?TypeScript ConfigService.getSettings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@ngx-config/core.ConfigService的用法示例。


在下文中一共展示了ConfigService.getSettings方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: Init

          t.inject([LanguageEffects, ConfigService], (effects: LanguageEffects, config: ConfigService) => {
            const defaultLanguage = config.getSettings('i18n.defaultLanguage');

            const action = new Init(config.getSettings('i18n'));
            const completion = new UseLanguageSuccess(defaultLanguage);

            const actions$ = TestBed.get(Actions);
            actions$.stream = hot('-a', {a: action});
            const expected = cold('-c', {c: completion});

            (t.e(effects.init$) as any).toBeObservable(expected);
          }));
開發者ID:John123Yu,項目名稱:universal-1,代碼行數:12,代碼來源:language.effects.spec.ts

示例2: getWorkingLanguage

          t.inject([ConfigService], (config: ConfigService) => {
            const defaultLanguage = config.getSettings('i18n.defaultLanguage');
            const res = getWorkingLanguage(defaultLanguage);

            t.e(res)
              .toBe(defaultLanguage);
          }));
開發者ID:John123Yu,項目名稱:universal-1,代碼行數:7,代碼來源:language.reducer.spec.ts

示例3: UseLanguageSuccess

            t.inject([ConfigService], (config: ConfigService) => {
              const defaultLanguage = config.getSettings('i18n.defaultLanguage');
              const action = new UseLanguageSuccess(defaultLanguage);
              const res = reducer(defaultLanguage, action);

              t.e(res)
                .toEqual(defaultLanguage);
            }));
開發者ID:John123Yu,項目名稱:universal-1,代碼行數:8,代碼來源:language.reducer.spec.ts

示例4:

        t.inject([ConfigService, I18NService], (config: ConfigService, i18n: I18NService) => {
          i18n.init(config.getSettings('i18n'));

          t.e(i18n.availableLanguages.length)
            .toBe(1);
          t.e(i18n.availableLanguages[0].code)
            .toBe('en');
        }));
開發者ID:John123Yu,項目名稱:universal-1,代碼行數:8,代碼來源:i18n.service.spec.ts

示例5: UseLanguage

              .subscribe(() => {
                const defaultLanguage = config.getSettings('i18n.defaultLanguage');

                const action = new UseLanguage(defaultLanguage.code);
                const completion = new UseLanguageSuccess(defaultLanguage);

                const actions$ = TestBed.get(Actions);
                actions$.stream = hot('-a', {a: action});
                const expected = cold('-c', {c: completion});

                (t.e(effects.useLanguage$) as any).toBeObservable(expected);
              });
開發者ID:John123Yu,項目名稱:universal-1,代碼行數:12,代碼來源:language.effects.spec.ts

示例6: ngOnInit

 ngOnInit(): void {
   this.title = 'APP_NAME';
   this.currentLanguage$ = this.store.pipe(select(getWorkingLanguage));
   this.availableLanguages = this.config.getSettings('i18n.availableLanguages');
   this.isAuthenticated = this.auth.isAuthenticated;
 }
開發者ID:John123Yu,項目名稱:universal-1,代碼行數:6,代碼來源:header.component.ts

示例7: ngOnInit

 ngOnInit(): void {
   this.i18nStore.dispatch(new Init(this.config.getSettings('i18n')));
 }
開發者ID:John123Yu,項目名稱:universal-1,代碼行數:3,代碼來源:app.component.ts


注:本文中的@ngx-config/core.ConfigService.getSettings方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。