From the course: Angular: Creating and Hosting a Full-Stack Site

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Create an Edit Listing page

Create an Edit Listing page

From the course: Angular: Creating and Hosting a Full-Stack Site

Start my 1-month free trial

Create an Edit Listing page

- [Instructor] The first thing we're going to look at is inputs. Basically what inputs allow us to do is pass data into our components from their parent components in a way that looks almost identical to defining attributes on simple HTML elements. In our case, let's say that on our edit listing page, we want to be able to pass in an input to our listing data form component that defines what text is displayed in the forms button. Something like this, for example. We could say button text equals save changes. Well, in order to make this work, we have to go into our listing data forms TypeScript file, and up at the top, along with component and OnInit, we're going to import something called input. And then down inside the body of the component, we're going to use this funny looking syntax to define an input called button text. So we'll say at input with parentheses after it button text, and then inside our listing data forms…

Contents