How to pass data through config.ts file without using service.ts file?

I used here data.json in data service to fetch the data but I want it to be without using data.json. Please help me find a solution on this, I have added the component file and config file below

-app.component.ts

@Component({
  selector: 'app-account-action',
  templateUrl: './account-action.component.html',
  styleUrls: ['./account-action.component.scss']
})
export class AccountActionComponent implements OnInit {
  public config = config;
  public dashboard = config;
  public todayvar: any = true;
  public timePeriod: boolean = false;
  public fieldData: accountData[];
  public data: any = [];
  public user = 'overall';
  public response: any;
  public weekvar: boolean = false;
  public monthvar: boolean = false;
  public yearvar: boolean = false;
  public show: string = '';
  public type: string = 'Today';
  public weekData: any
  public agent: string = '';
  public total: number;
  public value: any;
  constructor(public dataService: DataServiceService) {}



  ngOnInit() {
    this.dataService.todayvar.subscribe((res: any) => {
      this.show = res;
    })

    this.dataService.agentvar.subscribe((res: any) => {
      this.agent = res;
      this.user = res ? res : "overall";
      this.fetchdata();
    })
  }

  fetchdata() {
    this.dataService.todayAction().subscribe((res) => {
      this.response = res;
      this.value = res.filter(ele => ele.Type == this.type)
      this.data = this.value[0].values.filter(ele => ele.Name == this.user)
    })
  }

  today = (index) => {
    if (index == 'Today') {
      let value = this.response.filter(ele => ele.Type == "Today");
      this.data = value[0].values.filter(ele => ele.Name == this.user)
    } else {
      let value = this.response.filter(ele => ele.Type == index);
      this.data = [];
      this.data.push(value[0]['values']);
    }
    this.dataService.changeMessage(index);
  }
}

config.ts

@Component({
  selector: 'app-account-action',
  templateUrl: './account-action.component.html',
  styleUrls: ['./account-action.component.scss']
})
export class AccountActionComponent implements OnInit {
  public config = config;
  public dashboard = config;
  public todayvar: any = true;
  public timePeriod: boolean = false;
  public fieldData: accountData[];
  public data: any = [];
  public user = 'overall';
  public response: any;
  public weekvar: boolean = false;
  public monthvar: boolean = false;
  public yearvar: boolean = false;
  public show: string = '';
  public type: string = 'Today';
  public weekData: any
  public agent: string = '';
  public total: number;
  public value: any;
  constructor(public dataService: DataServiceService) {}


  ngOnInit() {
    this.dataService.todayvar.subscribe((res: any) => {
      this.show = res;
    })

    this.dataService.agentvar.subscribe((res: any) => {
      this.agent = res;
      this.user = res ? res : "overall";
      this.fetchdata();
    })
  }
  fetchdata() {
    this.dataService.todayAction().subscribe((res) => {
      this.response = res;
      this.value = res.filter(ele => ele.Type == this.type)
      this.data = this.value[0].values.filter(ele => ele.Name == this.user)
    })
  }


  today = (index) => {
    if (index == 'Today') {
      let value = this.response.filter(ele => ele.Type == "Today");
      this.data = value[0].values.filter(ele => ele.Name == this.user)
    } else {
      let value = this.response.filter(ele => ele.Type == index);
      this.data = [];
      this.data.push(value[0]['values']);
    }
    this.dataService.changeMessage(index);
  }
}

Source: New feed
Source Url How to pass data through config.ts file without using service.ts file?