interactive-form

Frontend Mentor - Interactive card details form solution

This is a solution to the Interactive card details form challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

Overview

The challenge

Users should be able to:

Screenshot Desktop

Screenshot Mobile

My process

Built with

What I learned

I developed myself mainly in terms of transferring data from one component to another through Angular’s Behavior Subject.

//on service class
private name$ = new BehaviorSubject<any>({});
selectedName$ = this.name$.asObservable();

setName(name: any) {
	this.name$.next(name);
}

//set value from any component
async setCardFormName(input: string):Promise<void> {
	this.cardFormService.setName(input);
}

//on another component, subscribe at the method from service class to get the value
this.cardFormService.selectedName$.subscribe((value) => {
	this.selectedName = value;
});

Continued development

I would like to delve deeper into web design for mobile devices, and create more and more responsive applications, on projects where I could use component-based frameworks.

Author