-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(angular): remove unnecessarily generated code for remotes #9844
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/4WKHdJBSwSsJABuhHSU2rLtqpHeR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
Left a non-blocking comment to consider.
const component = | ||
tree.read(pathToComponent, 'utf-8').split('templateUrl')[0] + | ||
`template: '<router-outlet></router-outlet>' | ||
}) | ||
export class AppComponent {}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imho, it would be better if we have the full template for the component here rather than splitting by a property based on what was previously generated. It's a small component, so the template would be small. It should be clearer, and we'd also reduce the potential maintenance associated with relying on a previous generation that could change and that we don't need to rely on. Regardless of a previous generation, we know the content of what we want in this component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good point. I will add this as an additional cleanup PR
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
We shouldn't generate unnecessary code when generating remote apps