Set value of input field in angular template

To set the initial value of the input control, just use the value attribute:

<input type="text" class="form-control" placeholder="Generate Codever sharable Url"

Project: codever - File: social-share-dialog.component.html

To understand usage of angular environment used in this snippet (environment.HOST) see the Configure and use environment specific values in Angular and html template snippet

Reference -

Shared with from Codever. 👉 Use the Copy to mine functionality to copy this snippet to your own personal collection and easy manage your code snippets.

Codever is open source on Github ⭐🙏

Subscribe to our newsletter for more code resources and news

Adrian Matei (aka adixchen)

Adrian Matei (aka adixchen)
Life force expressing itself as a coding capable human being

Mongoose schema field from list of strings (enum)

Mongoose schema field from list of strings (enum) code snippet Continue reading

How to use jest test.each function

Published on December 14, 2022