core
core copied to clipboard
TypeError: Cannot read property 'subscribe' of undefined
Hello friends! The first thing to thank for your work which has helped me a lot to create multilanguage applications, currently I am passing the tests with Karma in Angular9 obtaining the following error:
TypeError: Cannot read property 'subscribe' of undefined at <Jasmine> at TranslatePipe.updateValue (http://localhost:9876/karma_webpack/node_modules/@ngx-translate/core/ivy_ngcc/fesm2015/ngx-translate-core.js:1508:1) at TranslatePipe.transform (http://localhost:9876/karma_webpack/node_modules/@ngx-translate/core/ivy_ngcc/fesm2015/ngx-translate-core.js:1549:1) at ɵɵpipeBind1 (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:36748:1) at LoginScreenComponent_Template (ng:///LoginScreenComponent.js:59:33) at executeTemplate (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:12010:1) at refreshView (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:11857:1) at refreshComponent (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:13295:1) at refreshChildComponents (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:11586:1) at refreshView (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:11909:1) at renderComponentOrTemplate (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:11983:1)
I have tried different solutions, some of which obtained from various colleagues in forums without satisfactory result, The component has an empty controller, it is simply an html template that uses the translations pipeline.
Might you provide a minimum reproduction example?
Were
Hello friends! The first thing to thank for your work which has helped me a lot to create multilanguage applications, currently I am passing the tests with Karma in Angular9 obtaining the following error:
TypeError: Cannot read property 'subscribe' of undefined at at TranslatePipe.updateValue (http://localhost:9876/karma_webpack/node_modules/@ngx-translate/core/ivy_ngcc/fesm2015/ngx-translate-core.js:1508:1) at TranslatePipe.transform (http://localhost:9876/karma_webpack/node_modules/@ngx-translate/core/ivy_ngcc/fesm2015/ngx-translate-core.js:1549:1) at ɵɵpipeBind1 (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:36748:1) at LoginScreenComponent_Template (ng:///LoginScreenComponent.js:59:33) at executeTemplate (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:12010:1) at refreshView (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:11857:1) at refreshComponent (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:13295:1) at refreshChildComponents (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:11586:1) at refreshView (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:11909:1) at renderComponentOrTemplate (http://localhost:9876/karma_webpack/node_modules/@angular/core/ivy_ngcc/fesm2015/core.js:11983:1)
I have tried different solutions, some of which obtained from various colleagues in forums without satisfactory result, The component has an empty controller, it is simply an html template that uses the translations pipeline.
Were you able to solve this ?