How to load user data in a select field with ngFor?

0

My problem is the following: I have two arrays in firebase the category one:

{
 categorias {
            -KjsSKDoGxOoCJPNWmC6
              {
                id:0,
                nombre:"nombre de la categoria" 
              }
}

and the user who saves a category:

subvencionEscolar
  {
      adquisicionBienesMueblesInmuebles
          {
              -KjhktCmLOpecm3yWk0b
                  {
                    id:0,
                    nombre:"nombre x",
                    detail: 
                      {
                        categoria:"categoria que quiero comparar", 
                        fechadoc: "etc",
                        fechapag: "etc",
                        montodecl: "etc"
                      }
                  },
                  ...{}
          }
  }  

And I need to load this select with the category that the user has and also that it contains the other categories that exist This is the selection that I currently have, which shows all the categories:           {{cat.name}}         

this is what I would like to do:

<select name="" >
  <option  value="0" selected> categoria que contiene el usuario </option>
  <option> resto de categorias </option>
  ...
  </select>

I can not think of more ways to solve the problem, I've searched a lot but I have not found a solution: c

    
asked by sebastian acuña 12.05.2017 в 05:14
source

0 answers