These are chat archives for angular/angular-2-ionic-2

18th
Nov 2016
Dimitri
@ethanquix
Nov 18 2016 11:32
Hi ! Is there someone to answer a quick question ?
Andrew Graham-Yooll
@andrewgy8
Nov 18 2016 11:33
Depends what the question is...
Dimitri
@ethanquix
Nov 18 2016 11:34

I am currently making an Ionic app and I need to make an Alert with AlertController. Something like a countdown. So I plan to use Angular to update variable value, like that :
subTitle: 'The market is closed and will reopen in {{ countOpen.hours }} : {{ countOpen.minutes }}.',

But on my phone it display the text but exactly like written above, without angular replacing the inside {{}} with my var value
Do you know how to do that ?

Andrew Graham-Yooll
@andrewgy8
Nov 18 2016 11:36
Try 'The market is closed and will reopen in ' + {{ countOpen.hours }} ' : ' {{ countOpen.minutes }} '.'
'The market is closed and will reopen in ' {{ countOpen.hours }} ' : ' {{ countOpen.minutes }} '.'
Try the second one.
This is in template?
Or script?
Dimitri
@ethanquix
Nov 18 2016 11:37
It's in a script
Kyle Roach
@iRoachie
Nov 18 2016 11:37
@ethanquix Alert is a static component. Once displayed you can’t update the text.
Dimitri
@ethanquix
Nov 18 2016 11:37
Oh, so it's not possible to update the text of a alert ?
Kyle Roach
@iRoachie
Nov 18 2016 11:38
It doesn’t carry a template. You’ll need to use a modal and style it so it isn’t full screen
A modal is attached to a component and has its own template. So then you can update it
Andrew Graham-Yooll
@andrewgy8
Nov 18 2016 11:40
@iRoachie Learn something new everyday. Good on you!
Kyle Roach
@iRoachie
Nov 18 2016 11:40
:D
Dimitri
@ethanquix
Nov 18 2016 11:47
Okay, I will take a look at that after lunch time, thank's a lot!
Alexandre Almeida
@Vacalexis
Nov 18 2016 12:31
I am developing an app using Ionic 2 and trying to style a div, that is used as a table header, using "border-image". However, the image is not being loaded on my Android device, while when using 'ionic serve' it works perfectly on the browser. I am starting to believe 'border-image' is not supported.
The style I'm applying to the div is
border-style: solid; border-width: 0px; border-image: url("../assets/img/header.svg") 4 fill;
and my images are saved in src/assets/img.
Any tip or workaround?