Learning Angularjs 2.0, in the building development environment in the start of the card for a long time, groping a morning finally found a way, after constant testing finally to solve. It's still a little unclear, but I'm still documenting it.
Error error in Appmodule isn't an ngmodule:
Then I look at the dependent components NPM LS typescript
There is a different version number, one that needs to be relied on 2.2.2 One is the installed version 2.3.2.
Then enter CNPM install typescript [email protected] To install a 2.2.2 version.
Then replace "Typescript" in the Package.json file with the following: "~2.2.2"
Enter CNPM install to reinitialize.
Take a look at the dependency component NPM LS typescript
So the version number is 2.2.2, this can start the service, input ng serve
Successful start, very happy. Enter Http://localhost:4200/to see the effect.
Finally, when installing the environment, remember to use CNPM install. The native NPM install installation will give an error because we are in a magical country.
ERROR in Appmodule isn't an ngmodule