(function(angular) { 'use strict'; setTimeout( function asyncBootstrap() { angular.bootstrap( document, [ "app" ] ); }, ( 2 * 1000 ) ); var app = angular.module('app', []); app.run(['$rootScope','$timeout',initApp]); app.controller('ctrlHome', [ctrlHome]); function initApp($rootScope, $timeout){ $rootScope.appReady = true; $rootScope.appMessage = 'App is ready'; } function ctrlHome() { var ctrl = this; ctrl.message ='controller is ready'; } }(angular));
<div ng-controller="ctrlHome as ctrl"> <div class="body-content panel-body text-center"> <h2 class="text-info">AngularJS App Splash View by ozkary.com</h2> <div class="row"> <hr/> <div class="col-sm-12"> <i class="fa fa-thumbs-o-up fa-5x"></i> <h3>{{appMessage}}</h3> </div> </div> <div class="row"> <h4> {{ctrl.message}} </h4> </div> </div> </div>