When built for android, items are not rendered properly

Hi all,

I am actually working on application where Ionic Framework is perfectly suitable. I just need to display some views by consuming my RESTful API. Today I am working with google chrome which is great for getting quick preview of what I make and its rendering like I want.
The problem is when I build it and deploy it on Android I have some of my views that are not rendered properly.

For instance, below I have what I want and rendered by using google chrome.

And now when rendered with android.

Here the code that I am using to doing it… which is pretty simple.

<ion-view title="Actualit&eacute;s" ng-controller="FeedCtrl" ng-init="getFeeds()">
<ion-nav-buttons side="left">
    <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
<ion-content class="has-header">

    <div class="list card" ng-repeat="feed in feeds">

        <div ng-include="'/views/feed/textwallmessage.html'"></div>

    </div>

    <ion-infinite-scroll
            on-infinite="getFeeds()"
            distance="1%">
    </ion-infinite-scroll>

</ion-content>

Any idea of what’s going wrong ?
Thank you.

I would guess either the REST call isn’t working or the textwallmessage.html file isn’t being included. Have you tried A) putting the html from the textwallmessage.html file directly into the div to see if it shows up or B) testing on a real device instead of Genymotion? I’m not familiar with Genymotion but I know my REST calls don’t work on Ripple.

Hi brandyshea,

Yes before creating this topic I already made the test on 2 real android devices. And I have already tries to include “textwallmessage.html”. And as you can see it’s working on my browser and on the android browser as well… I suspect something related to android build and apk… Bu I do not know exactly what.

I meant the html that is inside of textwallmessage.html, have you tried to place that html inside of the list div instead of including the file? Just to rule out the possibility of it not recognizing the path in the build, where it may be able to figure it out in the browser.

1 Like

You were right. I have just changed

<div ng-include="'/views/feed/textwallmessage.html'"></div>

by

<div ng-include="'views/feed/textwallmessage.html'"></div>

and it’s working now :slight_smile: Thank you for your help.
Appreciate

You’re welcome. Glad to hear it. :smile:

1 Like