https://github.com/splincode/angular5-demo
example angular5
https://github.com/splincode/angular5-demo
Last synced: about 1 year ago
JSON representation
example angular5
- Host: GitHub
- URL: https://github.com/splincode/angular5-demo
- Owner: splincode
- Created: 2017-11-04T14:51:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-28T10:05:15.000Z (over 7 years ago)
- Last Synced: 2024-10-06T12:42:07.808Z (over 1 year ago)
- Language: TypeScript
- Size: 119 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular5
```bash
npm install
npm install -g http-server
```
## AOT mode
```bash
ng build --aot --prod
cd dist/
http-server
# open in browser http://127.0.0.1:8081
```

## JIT mode (Problem)
```bash
ng build --no-aot --prod
cd dist/
http-server
# open in browser http://127.0.0.1:8081
```
```text
main.c90f048daaa26da75376.bundle.js:1 Uncaught Error: Unexpected value 't' imported by the module 't'. Please add a @NgModule annotation.
at p (main.c90f048daaa26da75376.bundle.js:1)
at main.c90f048daaa26da75376.bundle.js:1
at Array.forEach ()
at t.getNgModuleMetadata (main.c90f048daaa26da75376.bundle.js:1)
at t._loadModules (main.c90f048daaa26da75376.bundle.js:1)
at t._compileModuleAndComponents (main.c90f048daaa26da75376.bundle.js:1)
at t.compileModuleAsync (main.c90f048daaa26da75376.bundle.js:1)
at t.compileModuleAsync (main.c90f048daaa26da75376.bundle.js:1)
at t.LMZF.t.bootstrapModule (main.c90f048daaa26da75376.bundle.js:1)
at Object.cDNt (main.c90f048daaa26da75376.bundle.js:1)
```
## JIT mode (Fix Problem)
```bash
ng build --prod --aot=false --build-optimizer=false
cd dist/
http-server
# open in browser http://127.0.0.1:8081
```
