I’d like to diplay a list of cities with selection’s indicator at left on item’s buttons. I need really to show continuously the select UI at left, but the text can be truncated.
The error is when I rotates from landscape (picture #1) to portrait and I get the picture #2 : the content seems to bee centerd rather to aligned at left. Moreover, if I rotates again landscape and again portrait I get the same result.
If changed, add following code according to landscape or portrait.
var tempButton = document.getElementById("button_id");
var buttonText = tempButton.getElementsByClassName("button-inner")[0];
buttonText.style.justifyContent = "left"; //change this value according to landscape and portrait
//Maybe you can use value "center" for landscape and "left" for portrait
Make sure you execute this code after page has loaded.
*This solution may change when ionic gets updated.
[13:28:05] typescript: …ers/Gardien/Documents/Apache www/Projets Ionic
/SWMG/src/pages/favoris/favoris.ts, line: 366
Property ‘style’ does not exist on type ‘Element’.
Does it come from the unvalid type of buttonText ?.. I’m working only on typescript not javascript.