Failed to load resource: roboto-regular.woff2

I have temporarily solved the problem by adding a hook to cordova build process:
in config.xml add:
<hook src="hooks/copy-fonts.js" type="after_prepare" />
then create a copy-fonts.js file in hooks folder with content

var copyfiles = require('copyfiles');
module.exports = function (context) {
    copyfiles([
        'node_modules/ionic-angular/fonts/**/*',
        'www/assets/fonts'
    ],
        true,
        () => { });
}

you must also install copyfiles package with npm
npm install --save-dev copyfiles

4 Likes