Basically, you need to install HammerJS
because you're using Material
component that requires it:
npm install hammerjs --save
systemjs.config.js
System.config({
path: {'npm:' : 'node_modules/'},
map: {'hammerjs': 'npm:hammerjs'},
packages: {
'hammerjs': { main: './hammer.js', defaultExtension: 'js'}
}
})
A few Material components (eg: md-slider
) import hammerjs
, so unless it's installed or linked via an external script (as in @Gunter's answer), you will run into problems.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.