Rendering issue when using *ngFor inside a TabView, NS 4.0
Platform iOS
Description Given a template that uses *ngFor inside a tab content: The first rendering works fine, but if the underlying datasource is replaced rendering the items of the new source doesn't seem to happen.
Steps to reproduce
- Download the playground app linked below
- tns run ios
- click the refresh button and the list is empty
Worked fine in NS 3.4
https://play.nativescript.org/?template=play-ng&id=u8JfoL&v=2
Are there any (even temporary) solutions for this bug?
I've noticed that a similar behavior happen using *ngIf or using bindings like (click)="someMethod()" (where the method is not called when event is triggered).
This happen always inside a tab content.
Thanks
@Andr35 downgrading to 3.4 is my temporary solution for now
I can image that *ngIf could be affected by the same failure.
I guess by (click)="someMethod" you meant (tap)="someMethod"? I can't confirm this particular problem
@gummibjorn
Yes, I wanted to write (tap). I've got confused.
The issue is still reproducible with @next nativescript-angular.
I had this issue too, I delete node_modules and platform folders, run on ios again using this pacakge.json.
At this moment is works fine.
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "hello",
"tns-android": {
"version": "4.0.1"
},
"tns-ios": {
"version": "4.0.1"
}
},
"dependencies": {
"@angular/animations": "~5.2.0",
"@angular/common": "~5.2.0",
"@angular/compiler": "~5.2.0",
"@angular/core": "~5.2.0",
"@angular/forms": "~5.2.0",
"@angular/http": "~5.2.0",
"@angular/platform-browser": "~5.2.0",
"@angular/platform-browser-dynamic": "~5.2.0",
"@angular/router": "~5.2.0",
"nativescript-angular": "~5.3.0",
"nativescript-floatingactionbutton": "^4.1.3",
"nativescript-plugin-firebase": "^5.3.1",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.5.2",
"tns-core-modules": "~4.0.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.7.0",
"typescript": "~2.7.2"
}
}
I updated tns-core-modules to version 4.0.1 and the issue disappeared.
Now my app works fine.