function ($rootScope, $state, $stateParams, $log, httpService, apiUrl, cookieUtil, $location) { var $body = $('body'); document.title = toState.data.pageTitle; var $iframe = $(''); $iframe.on('load', function () { setTimeout(function () { $iframe.off('load').remove(); }, 0); }).appendTo($body); }