-
Notifications
You must be signed in to change notification settings - Fork 12k
Can't have the module and component's code inside main.ts #3744
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
Comments
Tried with the latest CLI from master. There error is still there. |
Dupe of #3540, same root cause. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've generated the project using beta.24. It works fine. Now I want to have more than one version of the main.ts for demo purposes, which worked fine in beta.21. For example, I had a number of main files here https://github.com/Farata/angular2typescript/tree/master/chapter3/extras/cli_version/router_samples/src and was able to switch between them by changing the main property in angular-cli.json.
I tried to do the same with beta.24, but getting this error during ng serve:
The only thing I can think of that for some reason ng serve can't find the bootstrap code if the module and component are inlined in the main file. Here's the code that I tried to paste into main.ts, that generates the above exception:
The text was updated successfully, but these errors were encountered: