I'm trying to take text from one of my component.html files and save the input to a variable in a method in one of my .ts files. Can you help?
home.component.html file:
Username: <input ng-model="username"><br>
Password: <input ng-model="pass">
<button (click)="login()">Login</button>
home.component.ts file:
export class HomeComponent implements OnInit {
login()
{
const usr= {{username}};
const password={{pass}};
print("user is"+usr " Password is"+password);
}
}