Angular Service Workers Routes

时光怂恿深爱的人放手 提交于 2020-01-01 05:15:11

问题


I have built an app with Angular Service worker and it is all working well offline except for the routes. If I go to the base url the app loads fine but if I go to any of the other routes while offline I get an offline error.

My ngsw-manifest.json looks like

    {
        "routing": {
            "index": "/index.html",
            "routes": {
                "/": {
                "match": "exact"
                },
                "/home": {
                "match": "exact"
                },
                "/paramaterlessroutes": {
                "match": "exact"
                },
                "/routeswithparamaters": {
                "match": "prefix"
                }
            }
        }
    }

来源:https://stackoverflow.com/questions/45950366/angular-service-workers-routes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!