Two Way Binding Angular 11

I’m doing the Two Way Binding section on Mosh’s Angular Tutorial and it has an input box that shows a default value and allows the user to update the input field.

When the user hits the Enter button it console logs what the user updated the text to.
the way Mosh demonstrates is a way that no longer works in the current version as of typing this post, Angular 11.

Here is my courses.components.ts

import { Component } from '@angular/core';

import { CoursesService } from ‘./course/courses.service’;

selector: ‘courses’, //
template: <button class="btn btn-primary" []="isActive">Save</button> <input [value]="email" (keyup.enter)="email = $; onKeyUp()">
export class CoursesComponent {
title = “List of courses”;
imgUrl = “”;
imgWidth = “300px”
colSpan = 2;
isActive = true;
onSave($event: any) {
console.log(“Button was clicked!”, $event)

// email: any;
email = ""

onKeyUp() {

constructor(service: CoursesService) { = service.getCourses();

// Add the logic to call an http endpoint



thanks for the tip… I realize that