using $rootScope.loadData() instead of vanilla document reload