我是Angular的新手。
我有一个很大的外部组件(从某些外部库导入),该组件呈现图像和导航链接以及标头组件。
我创建了一个新组件,并希望在呈现上述组件的部分中添加。
如何控制上述组件的位置?
答案 0 :(得分:0)
在要加载的组件中添加新组件的HTML选择器。
@Component({
selector: 'app-home', \\this is the html selector
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
<app-home></app-home> //add this in the old component HTML page