Javascript 与angular js中的函数一起使用时,如何修改此文本的样式?

Javascript 与angular js中的函数一起使用时,如何修改此文本的样式?,javascript,css,angularjs,Javascript,Css,Angularjs,我有上面提到的显示文本的功能,如何将样式添加到此功能中, 我想在使用angular js显示时将文本颜色变为红色。如果要在html文档中打印,可以这样做 addSystemTextToDialog("please select one of the offerings and Hit enter"); addSystemTextToDialog(请选择其中一个产品并点击enter”; 然后在您的样式中,根据需要指定css addSystemTextToDialog("<p clas

我有上面提到的显示文本的功能,如何将样式添加到此功能中,
我想在使用angular js显示时将文本颜色变为红色。如果要在html文档中打印,可以这样做

 addSystemTextToDialog("please select one of the offerings and Hit enter");
addSystemTextToDialog(

请选择其中一个产品并点击enter

”;
然后在您的样式中,根据需要指定css

 addSystemTextToDialog("<p class='my'>please select one of the offerings and Hit enter</p>");

p、 我的
{
....
.....
}

请粘贴您之前尝试过的内容以及您被卡住的位置
showCode(“您需要显示addSystemTextToDialog函数的代码”)
<style>
p.my
{
....
.....
}
</style>