Skip to content
Angular Essentials
GitHub

Task - Data binding recap

  • Create a new component (manually or with CLI)
  • Output it beneath AppComponent (Just like we used app-card in app.component.html)
  • Add an input field that updates a property (‘username’) via Two-Way-Binding
  • Output the username property via String Interpolation (in a paragraph below the input)
  • Add a button that may only be clicked if the username is not an empty string
  • Upon clicking the button, the username should be reset to an empty string
  • Style button/input fields appropriately using Class/Style binding