File

src/app/modules/uci-admin/components/uci/uci.component.ts

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(userService: UserService, config: ConfigService, resourceService: ResourceService)
Parameters :
Name Type Optional
userService UserService No
config ConfigService No
resourceService ResourceService No

Methods

ngOnInit
ngOnInit()
Returns : void

Properties

Public blobUrl
Public resourceService
Type : ResourceService
Public uciBotPhoneNumber
Public url
Public userProfile
Type : any
Public userService
Type : UserService
import {Component, OnInit} from '@angular/core';
import {first} from 'rxjs/operators';
import {UserService} from '../../../core/services/user/user.service';
import {ConfigService, ResourceService} from '@sunbird/shared';

@Component({
  selector: 'app-uci',
  templateUrl: './uci.component.html',
  styleUrls: ['./uci.component.scss']
})
export class UciComponent implements OnInit {
  public userProfile: any;
  public url;
  public blobUrl;
  public uciBotPhoneNumber;

  constructor(public userService: UserService,
              private config: ConfigService,
              public resourceService: ResourceService) {
    this.blobUrl = (<HTMLInputElement>document.getElementById('blobUrl'))
      ? (<HTMLInputElement>document.getElementById('blobUrl')).value : '';
    this.uciBotPhoneNumber = (<HTMLInputElement>document.getElementById('uciBotPhoneNumber'))
      ? (<HTMLInputElement>document.getElementById('uciBotPhoneNumber')).value : '';
  }

  ngOnInit(): void {
    this.url = this.config.urlConFig.URLS.UCI;
    this.userService.userData$.pipe(first()).subscribe((user) => {
      if (user && user.userProfile) {
        this.userProfile = user.userProfile;
      }
    });
  }

}
<lib-lib-entry
[user]="userProfile" [baseUrl]="url" [blobUrl]="blobUrl" [botPhoneNumber]="uciBotPhoneNumber"
[resourceService]="resourceService"
>
</lib-lib-entry>

./uci.component.scss

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""