这个问题可能是由于缺少样式且text-decoration: line-through与font-weight样式发生冲突。以下是一个可能的解决方案:
/* styles.css */
.lineThrough {
text-decoration: line-through !important;
}
Hello World
在这个示例中,我们在全局的样式文件(styles.css)中创建了一个带有!important声明的.lineThrough类。然后,我们将这个类与ngClass绑定一起使用,并根据逻辑条件将其应用于