Making Angular routes work with Express routes

后端 未结 5 1012
无人共我
无人共我 2020-12-31 08:02

I\'ve got in impasse with setting Angular routes to work with Express.

I tried to do like here Express 4, NodeJS, AngularJS routing but that did not work. The stati

5条回答
  •  情歌与酒
    2020-12-31 08:19

    I just want to add that adding base href= helped me. I have my app statically served in express and browsing directly to routes in my angular app would cause lots of

    refused to execute script because its mime type ('text/html') is not executable and strict mime type checking is enabled

    errors to be throw. But adding base href fixed that and I can browse directly to my angular routes now.

提交回复
热议问题