【发布时间】:2017-04-03 01:29:18
【问题描述】:
谁能指导如何在 Angular 2 CLI 中使用 Smooth Scroll Polyfill。
我尝试在 polyfills.ts 中添加以下内容,但它在工作需要时引发错误
require('smoothscroll-polyfill').polyfill();
然后我尝试添加
import 'smoothscroll-polyfill';
虽然它在构建过程中没有抛出任何错误,但是当我在浏览器中运行项目时,它会在控制台上显示以下错误:
ERROR TypeError: Failed to execute 'scroll' on 'Window': No function was found that matched the signature provided.
【问题讨论】:
标签: angular angular-cli