October 2017
Intermediate to advanced
280 pages
6h 50m
English
Although both concepts sound similar, they have quite different semantics. In order to understand them better, let's take a look at the following example:
// ch5/view-child-content-child/app.ts
@Component({
selector: 'user-badge',
template: '...'
})
class UserBadge {}
@Component({
selector: 'user-rating',
template: '...'
})
class UserRating {}
Here, we've defined two components: UserBadge and UserRating. Let's define a parent component, which comprises both the components:
@Component({
selector: 'user-panel',
template: '<user-badge></user-badge>'
})
class UserPanel {...}
Note that the template of the view of UserPanel contains only the UserBadge component's selector. Now, let's use the UserPanel component ...
Read now
Unlock full access