Hi.
I have test angular4, sw-precahe, sw-toolbox.
I use sw-precache to create cache and service-worker.
sw-precache-config.js
module.exports = {
navigateFallback: '/index.html',
stripPrefix: 'dist',
root: 'dist/',
staticFileGlobs: [
'dist/index.html',
'dist/**.js',
'dist/**.css',
'dist/assets/img/*.{jpg,gif.svg,png}'
],
"runtimeCaching": [{
"urlPattern": 
"/https:\/\/fonts\.googleapis\.com\/icon\?family=Material\+Icons/",
"handler": "networkFirst"
}
] 
};

After
ng build --aot --prod
npm run sw
npm run static-serve

And sw-precache working but not work sw-toolbox
<https://lh3.googleusercontent.com/-WaB-rYetLJI/WaAya4l5OvI/AAAAAAAABrk/GxFNQbpfAPg3L1okGvdXZ0GCjhHSF4OBQCLcBGAs/s1600/%25D0%25A0%25D0%25B0%25D0%25B1%25D0%25BE%25D1%2587%25D0%25B5%25D0%25B5%2B%25D0%25BC%25D0%25B5%25D1%2581%25D1%2582%25D0%25BE%2B1_063.png>

If I add to service-worker next code
toolbox.precache(['/index.html','/**.js','/**.css','/assets/img/*']);
Toolbox make cache for static files but not create cache for url.

<https://lh3.googleusercontent.com/-uNxymkNdCrI/WaA0Zis64NI/AAAAAAAABrw/pZrvGLN9s7UUxpUybImBSA--16GXYJxpwCLcBGAs/s1600/%25D0%25A0%25D0%25B0%25D0%25B1%25D0%25BE%25D1%2587%25D0%25B5%25D0%25B5%2B%25D0%25BC%25D0%25B5%25D1%2581%25D1%2582%25D0%25BE%2B1_061.png>












Why sw-toolbox not cache url ( 
https://fonts.googleapis.com/icon?family=Material+Icons )?
Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to