Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Nest for Angular routing #694

Closed
dchrzanowski opened this issue May 16, 2018 · 4 comments
Closed

Setup Nest for Angular routing #694

dchrzanowski opened this issue May 16, 2018 · 4 comments

Comments

@dchrzanowski
Copy link

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ ] Feature request
[X] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

It is unclear which behaviour to use for serving an Angular app with routing. Should I use a * path controller as the last on in the array of controllers and do a res.sendFile to serve the index.html file or should I use a HttpExceptionFilter to res.sendFile the index.html file whenever the path is unresolved?

What is the motivation / use case for changing the behavior?

Using the HttpExceptionFilter filter seems like a logical choice, because of Angular needing access to other static files. This should be clearly laid out in the documentation in my opinion.

Basically: Have a distinct pattern to serve an Angular application, since this framework is very friendly with Angular.

Environment

NestJS 5.0.0

@bojidaryovchev
Copy link

bojidaryovchev commented May 16, 2018

Take a look at this https://github.com/kamilmysliwiec/universal-nest

@dchrzanowski
Copy link
Author

Ah, I see. Thanks for the tip. However, it would be great if the documentation would have a section on setting up Nest with Angular, whether with or without Universal

@kamilmysliwiec
Copy link
Member

Since it has nothing to do with the framework, I'd recommend creating this kind of issues in the documentation repository.

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants