6

I have an angular2 app with typescript that uses SystemJS; I used the following seed app.

When on desktop, you can see the loading text in between the tags (e.g. Loading...).

On my index page, I have a small loading div to show my apps being slow on first-time load.

But this div doesn't ever show on mobile.

Index Code

<app>
    <header>
        <nav>
            <div class="container col-sm-10 col-sm-offset-1">                 
                  <div class="navbar-header">      
                    <a class="navbar-brand col-xs-3 col-xs-offset-1">
                      <img src="./assets/logo.png" />
                    </a>
                  </div> 
            </div> 
         </nav>
    </header>

    <div class="bounceInDown animated">  
        <div class="loading-wrapper animated fadeIn">      
            <p class="loading-text">Hold on!<br />We're unpacking...</p>
            <div class="loading-icon preload"></div>
        </div>
    </div>
</app>

Let me know if you need any more code examples.

I basically want this div inside the app tags to show on mobile; I'm open to any jQuery mobile tricks, too.

It seems to be the keyframe. Can you let me know whats wrong?

CSS and keyframe Code

 .loading-icon {
        animation: scaleout 1.0s infinite ease-in-out;
        background-color: #ffffff;
        border-radius: 100%;
        display: inline-block;
        height: 40px;
        margin: 100px auto;
        -webkit-animation: scaleout 1.0s infinite ease-in-out;
        width: 40px;
    }
} 

@-webkit-keyframes scaleout {
  0% { -webkit-transform: scale(0) }
  100% {
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}

@keyframes scaleout {
  0% { 
    -webkit-transform: scale(0);
    transform: scale(0);
  } 100% {
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
    opacity: 0;
  }
}
8
  • try <app><div style="height: 100px; width:100px; background-color:red;"></div></app> ... I suspect loading of animation is taking time Commented Dec 10, 2016 at 18:35
  • its only css animation. it works fine on desktop but on mobile you cant see it Commented Dec 10, 2016 at 18:58
  • Please show us the real working page Commented Dec 10, 2016 at 19:04
  • I see bubble in the centre Commented Dec 10, 2016 at 19:12
  • Yeh thats because your looking at desktop? it works fine on desktop Commented Dec 10, 2016 at 19:12

1 Answer 1

3

Safari is picky on keyframe animations, if nothing is showing try removing the bounceInDown class and then try to re-add the animation features one by one and see what breaks.

EDIT: first try to move the bounceInDown -class in your css to before the @-webkit-keyframes bounceInDown

Sign up to request clarification or add additional context in comments.

11 Comments

I've added my keyframe code above. it seems to be my key frame causing trouble.
that css works in safari on mac and iphone. is it just the dot that is not showing for you on mobile? I cant see the "unpacking.." text even, and that has a different keyframe animation
On my iphone in safari I just get white screen. but when i take keyframe out it works fine. seems to be something wrong with my keyframe code above?
in @keyframes scaleout {} you don't need the webkit stuff, you have that in @-webkit-keyframes scaleout should not matter, but safari is picky
I've narrowed it down and on a safari iphone i just keep getting a white background on load rather than the loading text. Does angular2 work different on mobile when loading?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.