Hi, I’m starting with Ionic 2, I’m trying to make a simply select formulary with a few options on it. My code is:
On HTML:
<ion-item>
<ion-select [(ngModel)]="category" (ngSubmit)="changeCategory()">
<ion-option value="tt">TT</ion-option>
<ion-option value="ttintelligent">TT Intelligent</ion-option>
<ion-option value="ttmodular">TT Modular</ion-option>
<ion-option value="tv">TV</ion-option>
</ion-select>
</ion-item>
On TS:
export class CategoryPage {
category: string;
url: string;
constructor(private http: Http) { }
changeCategory(category) {
console.log(category);
}
This code is not working, I can’t get option value in the component file. Any solution? Thanks!