【发布时间】:2018-11-04 01:15:57
【问题描述】:
我有一些代码,但我在使用 <ng-content></ng-content> 时遇到了未定位的 css 问题
代码如下:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-embed',
template: `<ng-content></ng-content>`,
styles: [`
app-embed {
position:relative;
width:100%;
height:0;
padding-bottom:33%;
}
app-embed iframe {
width: 100vw;
height: 56.25vw;
}`]
})
export class AppEmbedComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
我该如何解决这个问题?
【问题讨论】:
标签: angular typescript angular6