1
I have an application, and I want to know how to insert information into the firebase database and then put this data inside a ion-select, my application uses a select of professions such as: "mechanic", "bricklayer", "teacher" and etc, and I want this to stay within a ion-option of ion-select, but I don’t know how to do it. I did it like this in my code:
<ion-select [(ngModel)]="profissoes1" okText="Salvar" cancelText="Cancelar">
<ion-option *ngFor="let items of items">{{items}}</ion-option>
</ion-select>
and I want a tip on how to use typescript, to get firebase professions to take the place of {{items}}, and how to insert the professions in firebase as well
is that I’m really lost in ion-select, and in firebase I just push and take the data by reference, but in this situation, I want the information to be entered manually in the database and stay inside the ion-option
– Junior Dos Santos
Right, to add data manually to your Firebase database, see this link. To populate your ion-options with the data coming from the database, you have to assemble a service that makes a request bringing the data of this route (/users, for example), and return this precedent to your page, and finally, assign this precedent in the attribute that will be in ng-model
– Raphael Vizoni