angular - In Angular2 cli I get a 404 when refreshing a route -
in angular2 cli 404 when refreshing route.
i'm using seed app: https://github.com/2sic/app-tutorial-angular4-hello-dnn
when a: ng serve jit app works fine.
when a: https://github.com/2sic/app-tutorial-angular4-hello-dnn works fine.
until refresh.
tech i'm using: webpack, http-server (to run aot app), typescript, jit , aot builds angular version 4
example:
navigate pricing, pricing loads fine, click refresh , 404. have path called '**' redirect home route if route not exist. pricing route exist , doesnt redirect home route either.
some type of setting im missing aot routing here?
i'm using http-server ./dist run aot app
these routes (non lazy loaded routes):
import { routes } '@angular/router'; import { homeroutes } './components/home/home.routes'; import { forgotpasswordroutes } './components/forgotpassword/forgotpassword.routes'; import { faqroutes } './components/faq/faq.routes'; import { dbsroutes } './components/dbs/dbs.routes'; import { pricingroutes } './components/pricing/pricing.routes'; import { privacyroutes } './components/privacy/privacy.routes'; import { termsroutes } './components/terms/terms.routes'; import { sitemaproutes } './components/sitemap/sitemap.routes'; import { aboutroutes } './components/about/about.routes'; import { contactroutes } './components/contact/contact.routes'; import { pagenotfoundroutes } './components/pagenotfound/pagenotfound.routes'; export const routes: routes = [ ...homeroutes, ...forgotpasswordroutes, ...faqroutes, ...sitemaproutes, ...pricingroutes, ...privacyroutes, ...termsroutes, ...aboutroutes, ...contactroutes, ...dbsroutes, ...pagenotfoundroutes ];
Comments
Post a Comment