Ionic 4: Set default ionic ion-select option

Ionic 4: Set default ionic ion-select option

Struggling to set the default option in an <ion-select> control. Using v4 rc2 but this has been an issue since I started with the late v4 betas.

Struggling to set the default option in an <ion-select> control. Using v4 rc2 but this has been an issue since I started with the late v4 betas.

The <ion-select> correctly sets the default selection but I get the small down caret. The selected option is not displayed. When I select the control, the alert is displayed and the correct option is selected. Or am I doing something wrong?

Does the order of setting the measureSetId vs loading the measureSets[] matter?

Thoughts? appreciate any help on this.

<ion-select name="measureSetSelect" [(ngModel)]="selectedMeasureSetId">
  <ion-select-option *ngFor="let measureSet of measureSets" [value]="measureSet.measureSetId">
    {{measureSet.name}}
  </ion-select-option>
</ion-select>

public measureSets: IMeasureSet[]; public selectedMeasureSetId: number;

ngOnInit() { this.measureSetsApiService.query().pipe(take(1)).subscribe(result => { this.selectedMeasureSetId = result.find(i => i.isDefault).measureSetId || 1; this.measureSets = result; }); }


angular ionic

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Pros and Cons of Ionic Development

If you think Ionic is the right cross-platform application development, here are a few pros and cons of Ionic development. 

Ionic 5 Tutorial: Create Offline Price Checker (Angular 9)

In this Ionic 5 tutorial, we will create an offline price checker using SQLite, Barcode Scanner, and Angular 9. The price checker usually uses by the store or retail business to check the actual price of the item, product, or goods. So, inside this app will contain an SQLite database table of products that have fields id, price look-up (PLU) or product code, barcode, product name, product description, and product sell price.

Angular 9, Ionic 5, React Navigation 5 - Web Dev Update February 2020

Here's an update on what's important in web development! Angular 9, Ionic 5, React Navigation 5 and more - I'll bring you up-to-date with what you need to know!

Basics of Angular: Part-1

What is Angular? What it does? How we implement it in a project? So, here are some basics of angular to let you learn more about angular. Angular is a Typesc

How to Leverage Angular Prereleases to keep Ionic in Sync

Unlike other open source projects, Angular tries to bring a new major release at least twice a year. With each new release, Angular stands by its commitment to ensuring the upgrade process is easier every time. in this post, you'll see How to Leverage Angular Prereleases to keep Ionic in Sync