Skip to content

Instantly share code, notes, and snippets.

Created September 25, 2020 21:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Campaign Display Component
<div class='hero'>
<div class='hero-overlay'>
<button class='btn-sign-up'(click)='buttonClicked()'>Click Here To Sign Up</button>
<img *ngIf="campaign.heroImageUrl" class='hero-image' [src]='campaign.heroImageUrl' alt='Campaign Image'/>
export class CampaignDisplayComponent implements OnInit {
@Input() campaign: Campaign;
@Output() signupButtonClicked: EventEmitter<boolean> = new EventEmitter<boolean>();
public heroImage = '';
public campaignDetails = 'This is some default text. If you are seeing this, your campaign is missing the signup message data.';
constructor(private campaignService: CampaignService) { }
ngOnInit(): void {
this.heroImage = this.campaign.heroImageUrl;
this.campaignDetails = this.campaign.signupMessage;
public buttonClicked(): void {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment