I am trying to display a div element if a checkbox is checked using ng-show. If the user does not have a telephone number, they check the checkbox and an input element should appear where they can enter their mailing address. However, switching between checked and unchecked values is having no effect at the moment.
I have done two way binding on the element.
-- My component.html file --
<input type="checkbox" name="myCheckbox" [(ngModel)]="person.myCheckbox">
I don't have a telephone
<div ng-show="person.myCheckbox">
Show when checked (telephone input)
</div>
-- Person.ts file --
export class Person {
constructor(
public myCheckbox: boolean
) { }
}