@onsenui said in How to ask a question.:
You can include any other resources that you consider important to understand your question. For example you can add links to external pages or embed images in the post (drag and drop the images to the composer).
interesting great information :)
Internally, each ons-tab has a radio input which is checked when the tab is active.
It’s a bit hacky, but you should just need to check the input and uncheck the currently active input for the active styling to work.
e.g. if fa-search is currently selected and you want to change tab to fa-user-md:
document.querySelector('ons-tab[icon="fa-search"] input').checked = false;
document.querySelector('ons-tab[icon="fa-user-md"] input').checked = true;
Sorry for the veeeeeeeeeeeeeeeeeeeeeeeeeery long delay.
This is a sandbox: https://codesandbox.io/s/awesome-keldysh-ltpd5
as you can see, there is a variable that is updated every second with a setInterval but the changes is not reflected
to the child when using a tabbar. The “Dummy” component, that is not a tabbar, is updated as expected with the same code.
Any idea ?
I am not familiar with Canvas, but I see your program, I think it doesn’t matter with Onsen UI, may be it matters with Touch Input.
May be the article Using Touch Events with the HTML5 Canvas can help you.
@emccorson thanks for the information!
I had been trying to use material.io, fonts.google.com and materialdesignicons.com with no luck. Guess “material design” isn’t really specific to one vendor, and of course, not cross compatible.
@emccorson said in How to change text color in ons-tab:
Yes, you can create a custom theme for Onsen UI here:
Scroll to the Tabbar section and change the colour as needed, then download and add to your project.
this answer is really useful, thank you.
That’s probably more bother than it’s worth to try and fix. I would suggest just adding your items in reverse order e.g.
@emccorson said in OnsNavigator pushPage(page, [options]) , loads page with a significant delay. (Angular) 8 ball pool:
ons.preload looks like it should do the trick.
You just need to pass ons.preload the names of the templates you want to preload and then call .then on the promise returned by preload. In the callback function, do whatever you need to - this will run when the templates have loaded.
Thank you very much for your quick reply, much appreciated.
@scaffo said in ons-carousel animation:
Actually I think I figured this out myself, basically it isn’t designed to do this. The carousel element is a “swiper” , which apparently means it only swipes. The animation attribute doesn’t seem to care about fade/lift/etc. just “none” to turn it off. If it’s on, it swipes using the translate3d() happy wheels function
You can however still control the manner of swiping via the animation-options
Thank you very much for the reply, I will work on the information you gave me.