相关疑难解决方法(0)

angular2中的<ng-content>自定义样式不起作用?

我正在尝试<ng-content>使用内联css 进行样式,但似乎样式不适用于ng-content,我还需要为样式做些其他事情?

<ng-content class="red"></ng-content> <p class="red">hello</p>
Run Code Online (Sandbox Code Playgroud)

这里的班级红色工作,p但不是

Working Example

angular

9
推荐指数
1
解决办法
1万
查看次数

标签 统计

angular ×1