angular input optional default value code example
Example 1: how to make input in angular optional
export class ChildComponent {
@Input() showName?: boolean;
constructor() { }
}
Example 2: how to set default value in input field in angularjs
<input ng-model="searchText" ng-init="searchText ='can you see me'"></input>