Closed zLinz closed 6 years ago
`var Observable = require ("data/observable"); var BottomBar = require ("nativescript-bottombar").BottomBar; var BottomBarItem = require ("nativescript-bottombar").BottomBarItem; var TITLE_STATE = require ("nativescript-bottombar").TITLE_STATE; var SelectedIndexChangedEventData = require ("nativescript-bottombar").SelectedIndexChangedEventData; var Notification = require ("nativescript-bottombar").Notification;
var BottomBarModel = { hidden: false, titleState: TITLE_STATE, _bar: BottomBar, inactiveColor: "", accentColor: "", items: new Array( new BottomBarItem (0, "Home", "ic_home_black_24dp", "black", new Notification ("blue", "white", "1")), new BottomBarItem (1, "Calendar", "ic_calendar", "#1083BF", new Notification ("green", "blue", "1")), new BottomBarItem (2, "Profile", "ic_collaborator", "pink", new Notification ("pink", "yellow", "1")), new BottomBarItem (3, "Message", "ic_paperplane", "green", new Notification ("green", "red", "1")) ), tabLoaded: function (event) { console.log ("barLoaded"); this._bar = event.object; this.hidden = false; this.titleState = TITLE_STATE.SHOW_WHEN_ACTIVE; this.inactiveColor = "white"; this.accentColor = "blue"; }, tabSelected: function (args) { console.log (args.newIndex); } }
module.exports = new Observable.fromObject(BottomBarModel);`
--js file
`
<btb:BottomBar row="1" items="{{ items }}" loaded="{{ tabLoaded($event) }}" hide="{{ hidden }}" titleState="{{ titleState }}" tabSelected="{{ tabSelected($event) }}" inactiveColor="{{ inactiveColor }}" accentColor="{{ accentColor }}" colored="true"> </btb:BottomBar> </GridLayout>`
-- xml file
I already bind the context, but all i got is
fatal error: Index out of range
Please help me. thank you.
this is an iOS issue not a specific JS one. Duplicate issue: #45
`var Observable = require ("data/observable"); var BottomBar = require ("nativescript-bottombar").BottomBar; var BottomBarItem = require ("nativescript-bottombar").BottomBarItem; var TITLE_STATE = require ("nativescript-bottombar").TITLE_STATE; var SelectedIndexChangedEventData = require ("nativescript-bottombar").SelectedIndexChangedEventData; var Notification = require ("nativescript-bottombar").Notification;
var BottomBarModel = { hidden: false, titleState: TITLE_STATE, _bar: BottomBar, inactiveColor: "", accentColor: "", items: new Array( new BottomBarItem (0, "Home", "ic_home_black_24dp", "black", new Notification ("blue", "white", "1")), new BottomBarItem (1, "Calendar", "ic_calendar", "#1083BF", new Notification ("green", "blue", "1")), new BottomBarItem (2, "Profile", "ic_collaborator", "pink", new Notification ("pink", "yellow", "1")), new BottomBarItem (3, "Message", "ic_paperplane", "green", new Notification ("green", "red", "1")) ), tabLoaded: function (event) { console.log ("barLoaded"); this._bar = event.object; this.hidden = false; this.titleState = TITLE_STATE.SHOW_WHEN_ACTIVE; this.inactiveColor = "white"; this.accentColor = "blue"; }, tabSelected: function (args) { console.log (args.newIndex); } }
module.exports = new Observable.fromObject(BottomBarModel);`
--js file
`
-- xml file
I already bind the context, but all i got is
Please help me. thank you.