ionic-team / ionic-team/ionic-unit-testing-example

Error: StaticInjectorError(t)[t -> function(){}]:

Đang mở
#95 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
370
Fork
144
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

wrote same code as in page1.spec.ts still getting this error.

Error: StaticInjectorError(t)[t -> function(){}]:
StaticInjectorError(Platform: core)[t -> function(){}]:
NullInjectorError: No provider for function(){}!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 't', Function ], ngDebugContext: t({ view: Object({ def: Object({ factory: Function, nodeFlags: 33669121, rootNodeFlags: 33554433, nodeMatchedQueries: 0, flags: 0, nodes: [ Object({ nodeIndex: 0, parent: null, renderParent: null, bindingIndex: 0, outputIndex: 0, checkIndex: 0, flags: 33554433, childFlags: 114688, directChildFlags: 114688, childMatchedQueries: 0, matchedQueries: Object({ }), matchedQueryIds: 0, references: Object({ }), ngContentIndex: null, childCount: 1, bindings: [ ], bindingFlags: 0, outputs: [ ], element: Object({ ns: '', name: 'signup', attrs: [ ], template: null, componentProvider: Object({ nodeIndex: 1, parent: , renderParent: , bindingIndex: 0, outputIndex: 0, checkIndex: 1, flags: 114688, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: Object, matchedQueryIds: 0, references: Object, ngContentIndex: -1, childCount: 0, bindings: ...
at t.get (webpack:///node_modules/@angular/core/esm5/core.js:1003 <- test-config/karma-test-shim.js:45:142)
at webpack:///node_modules/@angular/core/esm5/core.js:1301 <- test-config/karma-test-shim.js:52:2444
at yt (webpack:///node_modules/@angular/core/esm5/core.js:1243 <- test-config/karma-test-shim.js:52:2462)
at t.get (webpack:///node_modules/@angular/core/esm5/core.js:1111 <- test-config/karma-test-shim.js:52:1621) at webpack:///node_modules/@angular/core/esm5/core.js:1301 <- test-config/karma-test-shim.js:52:2444
at yt (webpack:///node_modules/@angular/core/esm5/core.js:1243 <- test-config/karma-test-shim.js:52:2462)
at t.get (webpack:///node_modules/@angular/core/esm5/core.js:1111 <- test-config/karma-test-shim.js:52:1621) at hi (webpack:///node_modules/@angular/core/esm5/core.js:10896 <- test-config/karma-test-shim.js:298:683)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.