Closed johnny-stevie closed 5 years ago
Thanks for reporting this issue was a typings error, the fix is in the version 2.0.3 that will be available in a couple of minutes 👍
Hello @henrychavez i updated the plugin and I get two main errors, however they dont stop the app weidly:
1.whenever i go to a page with two bottom tabs
ERROR TypeError: Cannot read property 'nativeElement' of undefined JS: ERROR CONTEXT { JS: "view": { JS: "def": { JS: "nodeFlags": 704823297, JS: "rootNodeFlags": 704643073, JS: "nodeMatchedQueries": 0, JS: "flags": 0, JS: "nodes": [ JS: { JS: "nodeIndex": 0, JS: "parent": null, JS: "renderParent": null, JS: "bindingIndex": 0, JS: "outputIndex": 0, JS: "checkIndex": -1, JS: "flags": 671088640, JS: "childFlags": 0, JS: "directChildFlags": 0, JS: "childMatchedQueries": 0, JS: "ngContentIndex": -1, JS: "matchedQueries": {}, JS: "matchedQueryIds": 0, JS: "references": {}, JS: "childCount": 0, JS: "bindings": [], JS: "bindingFlags": 0, JS: "outputs": [], JS: "element": null, JS: "provider": null, JS: "text": null, JS: "query": { JS: "id": 1, JS: "filterId": 2, JS: "bindings": [ JS: { JS: "propName": "_bottomNavigationBar", JS: "bindingType": 0 JS: } JS: ] JS: },...
2.whenever I start the app
ERROR in node_modules/nativescript-bottom-navigation/index.d.ts(21,3): error TS2416: Property 'activeColor' in type 'BottomNavigationBar' is not assignable to the same property in base type 'BottomNavigationBarBase'. Type 'string' is not assignable to type 'Color'. node_modules/nativescript-bottom-navigation/index.d.ts(22,3): error TS2416: Property 'inactiveColor' in type 'BottomNavigationBar' is not assignable to the same property in base type 'BottomNavigationBarBase'. Type 'string' is not assignable to type 'Color'. node_modules/nativescript-bottom-navigation/index.d.ts(23,20): error TS2304: Cannot find name 'Color'. node_modules/nativescript-bottom-navigation/index.d.ts(46,22): error TS2304: Cannot find name 'EventData'
I think this is easily fixed because you forgot to import the Color and Event Data libs, but I don't know about the active and inactive Color error. Any advice?
Before start:
Which platform(s) does your issue occur on?
What type of device?
Please, provide the following version numbers that your issue occurs with:
"@types/node": "~7.0.5", "tns-platform-declarations": "next"
Please, tell us how to recreate the issue in as much detail as possible. Describe the steps to reproduce the behavior: Followed instructions in demo where i tried to change tabs in order to navigate between different pages
Is there any code involved? `@ViewChild('bottomNavigationBar', { read: ElementRef, static: false }) private _bottomNavigationBar: ElementRef;
onbottomNavigationBarLoaded(): void { const bottomNavigationBar = this._bottomNavigationBar.nativeElement; bottomNavigationBar.showBadge(1); bottomNavigationBar.showBadge(2, 4); }
onBottomNavigationTabSelected(args:TabSelectedEventData):void{ switch (args.newIndex){ case 0: this.router.navigate(["home"],{ transition:{ name:"slideRight", duration:100, curve:"linear" }, queryParams: { searchQuery:this.searchQuery }}); break; case 1: this.routerExtensions.backToPreviousPage(); break; default: break; } } onBottomNavigationTabPressed(args: TabPressedEventData): void { switch (args.index){ case 0: this.router.navigate(["home"],{ transition:{ name:"slideRight", duration:100, curve:"linear" }, queryParams: { searchQuery:this.searchQuery }}); break; case 1: this.routerExtensions.backToPreviousPage(); break; default: break; } } onBottomNavigationTabReselected(args: TabReselectedEventData): void { switch (args.index){ case 0: this.router.navigate(["home"],{ transition:{ name:"slideRight", duration:100, curve:"linear" }, queryParams: { searchQuery:this.searchQuery }}); break; case 1: this.routerExtensions.backToPreviousPage(); break; default: break; } }`
The cause of errors:
ERROR in node_modules/nativescript-bottom-navigation/index.d.ts(14,22): errorember 'createTabs' from class 'BottomNavigationBarBase'. node_modules/nativescript-bottom-navigation/index.d.ts(14,22): error TS2515: lectTabNative' from class 'BottomNavigationBarBase'. node_modules/nativescript-bottom-navigation/index.d.ts(53,22): error TS2515: tNativeIcon' from class 'BottomNavigationTabBase'.
https://github.com/johnny-stevie/ytDownloader