Open pliablepixels opened 9 years ago
If it helps, I think what is happening is that the text does come, but it takes time and if the banner disappears before that, then one thinks its an empty banner - I have no idea why the text gets delayed
Some more debugging - it does not seem to be a factory issue. I removed the factory invocation and directly put in
var contentBannerInstance =
$ionicContentBanner.show({
text: eventsToDisplay,
interval: 5000,
autoClose: 5000*eventsToDisplay.length,
type: 'alarm',
transition: 'vertical',
//cancelOnStateChange: false
});
What seems to be happening is it starts off fine for the first few invocations.Then there is a slight delay in text. And then suddenly the text doesn't come. And then sometime later it shows up again, and then the loop continues. It seems to me the text display timer is not being cleared somewhere.
Okay, this seems to be an 'iOS only' problem. Never occurs in Android. I am running iOS9
There is a separate issue (https://github.com/djett41/ionic-content-banner/issues/15) asking the same thing, but the added caveat is I have wrapped the function around in a service for convenience.
Every once in a while, the banner shows up with the background but no text
Here is my factory function. I tried looking at the code, but your use of angular is way beyond my current knowledge of it.
My service code:
As you see, inside my wrapper I am printing out the value of the text and its filled in each time. I'm pulling my hair out trying to figure this out.
I invoke it like this:
where eventsToDisplay is an array of text.
It works sometimes and does not work sometimes.
Does this have anything to do with a service wrapper? Something to do with scopes maybe?
thanks