MenuItem.ts throw an error the Router injetored is null
@unix is already working on this.
Since Jun 18, 2018.
Assessment
This issue has not been assessed yet.
Description
Issue Type:
- Bug
- Feature
- Help
Version & Environment:
package.json
{
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.0.3",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
"core-js": "^2.5.4",
"element-angular": "^0.7.6",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular/compiler-cli": "^6.0.3",
"@angular-devkit/build-angular": "~0.6.6",
"typescript": "~2.7.2",
"@angular/cli": "~6.0.7",
"@angular/language-service": "^6.0.3",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1"
}
}
error in console:
Error: StaticInjectorError(AppModule)[ElMenuItem -> Router]:
StaticInjectorError(Platform: core)[ElMenuItem -> Router]:
NullInjectorError: No provider for Router!
at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:979)
at resolveToken (core.js:1232)
at tryResolveToken (core.js:1182)
at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:1077)
at resolveToken (core.js:1232)
at tryResolveToken (core.js:1182)
at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:1077)
at resolveNgModuleDep (core.js:9217)
at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:9911)
at resolveDep (core.js:10276)
Description:
I guess the problem is Angular6 that not has Router in RouterModule
- Dominant language
- TypeScript
- Stars
- 528
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ElemeFE/element-angular
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ElemeFE/element-angular#155 ·
-
Latest vue.js library version 2.15.14 in angular and compatibility with the latest angular version Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
ElemeFE/element-angular#171 ·
-
Generic type 'ModuleWithProviders<T>' requires 1 type argument(s) when tried to import Elmodule Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
ElemeFE/element-angular#167 · 2 comments ·
-
Update on Angular 9 Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
ElemeFE/element-angular#165 · 2 comments · 6 reactions ·
-
快速上手那里的指导,在运行的地方命令出错 Open
Difficulty 1/5 Under an hour Newbie friendliness 45/100
ElemeFE/element-angular#164 · 1 comment ·
All issues in ElemeFE/element-angular
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·