法一:
页面中:
ts文件中:
法二:使用插件,在github上找到的插件https://github.com/selemxmn/ngx-print
加标题
加样式:
使用现有样式
使用外部文件中的样式
案例: