Sometimes the $scope.init function runs before the uib-tabset directive finished rendering into the DOM, so the querySelector returns null.
$el[0].querySelector('.spacer ul.nav-tabs');
I temporarily fixed it in my code by setting in a delay for the init function.
ex:
$timeout(function(){
$scope.init();
}, 100);
Is there a better solution?