当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript service.ConfigService.get方法代码示例

本文整理汇总了TypeScript中app/core/ui-services/config.service.ConfigService.get方法的典型用法代码示例。如果您正苦于以下问题:TypeScript service.ConfigService.get方法的具体用法?TypeScript service.ConfigService.get怎么用?TypeScript service.ConfigService.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app/core/ui-services/config.service.ConfigService的用法示例。


在下文中一共展示了service.ConfigService.get方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: constructor

    /**
     * Constructs this component.
     *
     * @param {Title} titleService set the browser title
     * @param {TranslateService} translate the translation service
     * @param {ConfigService} configService The configuration provider
     * @param {FormBuilder} formBuilder Form builder
     * @param {MotionRepositoryService} repo Motion Repository
     * @param {ActivatedRoute} route The activated route
     * @param {Router} router The router
     * @param {MatSnackBar} matSnackBar Material Design SnackBar
     */
    public constructor(
        titleService: Title,
        protected translate: TranslateService, // protected required for ng-translate-extract
        private configService: ConfigService,
        private formBuilder: FormBuilder,
        private repo: MotionRepositoryService,
        private route: ActivatedRoute,
        private router: Router,
        matSnackBar: MatSnackBar
    ) {
        super(titleService, translate, matSnackBar);
        this.createForm();

        this.configService.get<number>('motions_line_length').subscribe(lineLength => {
            this.lineLength = lineLength;
            this.getMotionByUrl();
        });

        this.configService.get<boolean>('motions_reason_required').subscribe(required => {
            this.reasonRequired = required;
        });

        this.configService.get<boolean>('motions_amendments_multiple_paragraphs').subscribe(allowed => {
            this.multipleParagraphsAllowed = allowed;
        });
    }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:38,代码来源:amendment-create-wizard.component.ts

示例2: ngOnInit

    /**
     * Init the component.
     *
     * Sets the welcomeTitle and welcomeText.
     */
    public ngOnInit(): void {
        super.setTitle('Home');

        // set the welcome title
        this.configService
            .get<string>('general_event_welcome_title')
            .subscribe(welcomeTitle => (this.welcomeTitle = welcomeTitle));

        // set the welcome text
        this.configService
            .get<string>('general_event_welcome_text')
            .subscribe(welcomeText => (this.welcomeText = welcomeText as string));
    }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:18,代码来源:start.component.ts

示例3: constructor

 public constructor(
     private operator: OperatorService,
     private configService: ConfigService,
     private constants: ConstantsService
 ) {
     // load config variables
     this.configService
         .get<number>('motions_min_supporters')
         .subscribe(supporters => (this.configMinSupporters = supporters));
     this.configService
         .get<boolean>('motions_amendments_enabled')
         .subscribe(enabled => (this.amendmentEnabled = enabled));
     this.constants
         .get<OpenSlidesSettings>('OpenSlidesSettings')
         .subscribe(settings => (this.amendmentOfAmendment = settings.MOTIONS_ALLOW_AMENDMENTS_OF_AMENDMENTS));
 }
开发者ID:jwinzer,项目名称:OpenSlides,代码行数:16,代码来源:local-permissions.service.ts

示例4: constructor

    public constructor(
        titleService: Title,
        translate: TranslateService,
        matSnackBar: MatSnackBar,
        private repo: CountdownRepositoryService,
        private configService: ConfigService
    ) {
        super(titleService, translate, matSnackBar);

        this.configService.get<number>('agenda_countdown_warning_time').subscribe(time => (this.warningTime = time));
    }
开发者ID:emanuelschuetze,项目名称:OpenSlides,代码行数:11,代码来源:countdown-controls.component.ts

示例5: constructor

 /**
  * Constructor. Subscribes to configuration values
  *
  * @param translate handle translations
  * @param motionRepo get parent motions
  * @param configService Read config variables
  * @param userRepo User repository for counting amount of ballots needed
  * @param pdfService the pdf document creation service
  */
 public constructor(
     private translate: TranslateService,
     private motionRepo: MotionRepositoryService,
     private configService: ConfigService,
     private userRepo: UserRepositoryService,
     private pdfService: PdfDocumentService
 ) {
     this.configService
         .get<number>('motions_pdf_ballot_papers_number')
         .subscribe(count => (this.ballotCustomCount = count));
     this.configService
         .get<BallotCountChoices>('motions_pdf_ballot_papers_selection')
         .subscribe(selection => (this.ballotCountSelection = selection));
     this.configService.get<string>('general_event_name').subscribe(name => (this.eventName = name));
     this.configService.get<{ path?: string }>('logo_pdf_ballot_paper').subscribe(url => {
         if (url && url.path) {
             if (url.path.indexOf('/') === 0) {
                 url.path = url.path.substr(1); // remove prepending slash
             }
             this.logo = url.path;
         }
     });
 }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:32,代码来源:motion-poll-pdf.service.ts

示例6: ngOnInit

 /**
  * Gets the currently selected majority choice option from the repo
  */
 public ngOnInit(): void {
     this.majorityChoice =
         this.pollService.majorityMethods.find(method => method.value === this.pollService.defaultMajorityMethod) ||
         null;
     this.descriptionForm = this.formBuilder.group({
         description: this.poll ? this.poll.description : ''
     });
     this.subscriptions.push(
         this.config.get<AssignmentPercentBase>('assignments_poll_100_percent_base').subscribe(() => {
             if (this.poll) {
                 this.poll.pollBase = this.pollService.getBaseAmount(this.poll);
             }
         })
     );
 }
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:18,代码来源:assignment-poll.component.ts

示例7: constructor

    /**
     * Constructs this component.
     *
     * @param {Title} titleService set the browser title
     * @param {TranslateService} translate the translation service
     * @param {ConfigService} configService The configuration provider
     * @param {FormBuilder} formBuilder Form builder
     * @param {MotionRepositoryService} repo Motion Repository
     * @param {ActivatedRoute} route The activated route
     * @param {Router} router The router
     * @param {DomSanitizer} sanitizer The DOM Sanitizing library
     * @param {LinenumberingService} lineNumbering The line numbering service
     * @param {MatSnackBar} matSnackBar Material Design SnackBar
     */
    public constructor(
        titleService: Title,
        protected translate: TranslateService, // protected required for ng-translate-extract
        private configService: ConfigService,
        private formBuilder: FormBuilder,
        private repo: MotionRepositoryService,
        private route: ActivatedRoute,
        private router: Router,
        private sanitizer: DomSanitizer,
        private lineNumbering: LinenumberingService,
        matSnackBar: MatSnackBar
    ) {
        super(titleService, translate, matSnackBar);
        this.createForm();

        this.configService.get<number>('motions_line_length').subscribe(lineLength => {
            this.lineLength = lineLength;
            this.getMotionByUrl();
        });

        this.configService.get<boolean>('motions_reason_required').subscribe(required => {
            this.reasonRequired = required;
        });
    }
开发者ID:emanuelschuetze,项目名称:OpenSlides,代码行数:38,代码来源:amendment-create-wizard.component.ts


注:本文中的app/core/ui-services/config.service.ConfigService.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。