input text value in angular code example

Example 1: get input value angular

const type = (<HTMLInputElement>document.getElementById('type')).value;


#https://www.fiverr.com/tamerjarrar

Example 2: angular turn text into input

<td>
     <strong id="keyword.name" ng-if="!editMode">{{ keyword.name }}</strong>
     <span ng-if="editMode">
        <input ng-model="keyword.name">
        <button ng-click="save(keyword); editMode = false">Save</button>
     </span>
</td>
<td>
    <button ng-click="editKeyword(keyword); editMode = true">Edit</button>
    <button ng-click="deleteKeyword(keyword)">Delete</button>
</td>

Example 3: sending value in input angular material

<input matInput type="text" name="todo" #todo placeholder="Enter a todo">