Black screen on first cached template view


#1

Not really sure if this is a Ionic issue, a misconfiguration or something else on my side of faults, but this is the situation:

On the configuration side, we have a state defined this way:

$stateProvider
    .state('root', {
        url: '',
        templateUrl: 'views/homeView.html',
        controller: 'homeController'
    })
    .state('home', {
        url: '/',
        templateUrl: 'views/homeView.html',
        controller: 'homeController'
    });

The view template is defined in this way:

<script id="views/homeView.html" type="text/ng-template">
<div ng-cloak>
    <ion-nav-buttons side="left">
        <button class="button button-clear" ng-click="toggleMenu()">
            <i class="icon ion-navicon"></i>
        </button>
    </ion-nav-buttons>
    <ion-view title="Home" hide-back-button="true">
            <ion-content>
            </ion-content>
    </ion-view>
</div>
</script>

The effect is, every time I start the app for the first time, I see a completely black view instead of the (supposedly) cached one.

After I change state and come back to /home, I finally see the correct view.

Am I doing something wrong?


Black screen on iOS only