How to build a complicated local database


#1

Hello guys,

I’m building an app with many html pages containing different info.
Each page needs different media files loaded inside and each of them can be navigated using a search bar implemented as a part of menu.
I realized this configuration is not be the best and am trying to downsize the number of pages into only one and build a local database to load data to divs on my page.

How do you guys configure this kind of set up?
and how can I make search result load data and lots of media files properly to many different divs?
Especially, how can I make specific functions loaded from a database?
So, with a single click on search database, the whole content of HTML page should change.
I would appreciate any example ts files or relevant tutorials.

Thanks,


#2

-> I am trying to downsize the number of pages

Angular supports dynamic content:

Or you could use ng-dynamic-forms and describe your ‘forms’ using JSON:

For example:

ngOnInit() {

    this.http.get<object[]>('./app/my-dynamic-form.model.json').subscribe(formModelJson => {

        this.formModel = this.formService.fromJSON(formModelJson);
        this.formGroup = this.formService.createFormGroup(this.formModel);
    });
}

#3

Thanks for your response, I decided to study Angular more on this topic!