A while back, I posted about building a simple component in react. In this post, I’m going to go through building that same component in Angular 2 …
The component will look like below. There will be a parent component with 2 child components …
The code of the consuming component is listed below …
import { Component } from "angular2/core";
import { SearchComponent } from "./search.component";
@Component({
selector: "my-app",
directives: [SearchComponent],
template: `
<search></search>
`
})
export class AppComponent {}
#angular #component