Skip to content

Instantly share code, notes, and snippets.

View johnnyasantoss's full-sized avatar
🤓
Learning

Johnny Santos johnnyasantoss

🤓
Learning
View GitHub Profile
@johnnyasantoss
johnnyasantoss / debug-ui-view.js
Created February 9, 2017 11:50
Use this script to debug ui-view (works with minified files too!) Just paste it on console and hit enter.
jQuery(function ($) {
var view = $("[ui-view]").first();
if (!view) return;
var $rootScope = angular.element(view).injector().get('$rootScope');
$rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
console.log('$stateChangeStart to ' + toState.name + '- fired when the transition begins. toState,toParams : \n', toState, toParams);
});