question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select default value

See original GitHub issue

Having some trouble setting the default value of the dropdown select. here is my sample code using angular 4.

<mz-select-container>
  <select id="options-select" required name="hour" mz-select [label]="'Hour'"
 [(ngModel)]="appointment.startHour">
    <option *ngFor="let hour of hours" [ngValue]="hour">{{hour}}</option>
  </select>
</mz-select-container>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
scotecommented, Jul 24, 2017

Good, I’m gonna close this issue.

1reaction
bakosergecommented, Jul 21, 2017

ok. will try that and let you know . thanks again for the reply.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set the default value for an HTML <select> element
The option tag contains the value that would be used when selected. The default value of the select element can be set by...
Read more >
How can I set the default value for an HTML <select> element?
Add an attribute data-selected to each <select> element and set the value(s) to the value of the option you wish to have selected....
Read more >
How to set the default value for an HTML ... - Educative.io
You can choose your default value by setting your default value of choice to selected , as shown below.
Read more >
<select>: The HTML Select element - HTML - MDN Web Docs
If no value attribute is included, the value defaults to the text contained inside the element. You can include a selected attribute on...
Read more >
react-select default value - CodeSandbox
Create Sandbox Sign in. Sandbox Info. react-select default value. Trying to wrangle react-select to select a specific value by default in the menu....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found