@Component
, a TypeScript decorator
, which allows you to modify a class or function definition and adds metadata to properties and function arguments.name
variable into the template between the double braces {{name}}
, what get rendered in the view is <p>Hello World</p>
.Component
decarator from @angular/core
before we can make use of it. To use this component we simply add <rio-hello></rio-hello>
to the HTML file or another template, and Angular will insert an instance of the HelloComponent
view between those tags.