initialView.dismiss causes orientation bug in IOS


I’m trying to use initial view as my login screen. But on initialView.dismiss() I get the below error!

Could not find common orientations between application and webview configurations. This most commonly happens when app is configured to landscape and the webview is configured to portrait.

App orientations: Portrait
Webview orientations: None

My code below:

         $timeout(function() {
           //Do Something
         }, 100);

Even after the initial view is dismissed, the app does not crash! It stays open with a black screen.

Any idea on how to resolve this?