Angular 2 - typescript 中的 window.print 是什么

标签 angular typescript

在 javascript 中我可以这样做:

window.print()

要调出打印机对话框,但如何在 typescript 中执行此操作?

最佳答案

(window as any).print();

如果不使用 typescript 2.8.2,请使用上面的行。

关于Angular 2 - typescript 中的 window.print 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43189228/

相关文章:

angular - 常规变更日志自定义模板 - 如果未指定关闭则不返回任何行

angular - 禁用 Angular ng-select 窗口

typescript - Electron 和 typescript : 'fs' can't be resolved

javascript - 如何禁用图表 ChartJS 中的点击

javascript - ES6 : how to split an async generator function without losing yield ability

angular - 使用beta6编译报错

ios - 找不到模块 : './app.module.ngfactory' i while build iOS app --prod --release

函数参数中的TypeScript Array Union Type

typescript - 是否有用于 TypeScript 的代码生成 API?

angular - 显示动态嵌套数据