import { Component, Input, OnInit } from '@angular/core'; import { BrandingService } from '../branding.service'; @Component({ selector: 'rss-footer', templateUrl: './rss-footer.component.html', styleUrls: ['./rss-footer.component.scss'], providers: [BrandingService] }) export class RssFooterComponent implements OnInit { @Input() environment; footerInformation: any; constructor(private brandingService: BrandingService) { } ngOnInit() { this.getBrandingDetails(); } private getBrandingDetails = () => { this.brandingService.getBranding(this.environment) .subscribe(res => { this.footerInformation = res.brand; } , err => console.error(err)); } }