Reputation: 446
I am beginner to Nativescript, I am trying to use BottomNavigationBar in my project. Below steps i have followed.
Step 1: npm i nativescript-bottom-navigation -> executed on my project path Step 2: added the icons(As for testing purpose i have added only one image 'ic_home' and i only used that icon for all items) for android & iOS in your App_Resources directory. Step 3: As guided in this link added html file and typescript codes
But I am getting below error while trying to run app. Please help me to come out from this rid.
==================
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method onCreateView failed
TypeError: AHBottomNavigation is not a constructor File: "file:///data/data/org.nativescript.bottomsheet/files/app/tns_modules/nativescript-bottom-navigation/bottom-navigation.js, line: 22, column: 26
==================
Upvotes: 0
Views: 1266
Reputation: 629
Why not use the nativescript Tab View? https://docs.nativescript.org/angular/code-samples/ui/tab-view
I'm guessing you want to put the tabs at the bottom on android platform? well in the latest version of nativescript (4.0) you can now have the option to put the tab at the bottom on android by setting androidTabsPosition="bottom"
see this link for example: https://docs.nativescript.org/angular/code-samples/ui/tab-view#tabs-position
Upvotes: 1