A
A
Adel Khalitov2019-01-28 19:36:57
Angular
Adel Khalitov, 2019-01-28 19:36:57

How to display object of objects in angular 7?

There is an object of objects.

var rielt: Object = { 
  buy: {
    name: 'Купить',
    type: {
      name: 'somename',
      thing: {
        room: 'Комната',
        home:'Квартира'
      }
    }
  }, 
  rent: {
    name: 'Арендовать',
    type: {
      name: 'somename',
      thing: {
        room: 'Дом',
        home:'Замлю'
      }
    }
  }
};

I need to output something like this:
<mat-option value="buy">Купить</mat-option>
<mat-option value="rent">Арендовать</mat-option>

Next, set the conditions so that if you select the "Buy" option, then display the options in the adjacent select
<mat-option value="room">Комната'</mat-option>
<mat-option value="home">Квартира</mat-option>

Any ideas how to implement this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-01-28
@SaveLolliPoP

For example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question