I have the following code to set image on header:
<ion-header> <ion-navbar> <ion-row> <ion-col width-10> <ion-img src="./assets/img/icon.png"></ion-img> </ion-col> <ion-col> <ion-img style="margin-left: 40px;margin-right: 50px" src="./assets/img/Header.png"></ion-img> </ion-col> </ion-row> </ion-navbar> </ion-header>
I am getting the below errors while doing ionic serve
EXCEPTION: Uncaught (in promise): Error: Error in ./Groups class Groups - inline template:20:17 caused by: Cannot read property ‘isImgsUpdatable’ of null
TypeError: Cannot read property ‘isImgsUpdatable’ of null
at Img.update (http://localhost:8100/build/main.js:72256:39)
at Img.set [as src] (http://localhost:8100/build/main.js:72226:22)
at Wrapper_Img.check_src (/IonicModule/Img/wrapper.ngfactory.js:25:22)
at CompiledTemplate.proxyViewClass.View_Groups0.detectChangesInternal (/AppModule/Groups/component.ngfactory.js:502:17)
at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:8100/build/main.js:110481:14)
at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:8100/build/main.js:110574:44)
at CompiledTemplate.proxyViewClass.View_Groups_Host0.detectChangesInternal (/AppModule/Groups/host.ngfactory.js:29:19)
at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:8100/build/main.js:110481:14)
at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:8100/build/main.js:110574:44)
at ViewRef_.detectChanges (http://localhost:8100/build/main.js:59629:20)
My ionic info:
Your system information:
Cordova CLI: 6.4.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.8.1
Xcode version: Not installed
NOTE
The code works inside ion-content
.
It also works if I use just img
instead of ion-img
.
Am I missing something in ion-img or is this a bug?