{"size": 648, "ext": "js", "max_stars_repo_path": "app/navigation/nav.controller.js", "max_stars_repo_name": "Fleeck/ngfire-store", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/navigation/nav.controller.js", "max_issues_repo_name": "Fleeck/ngfire-store", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/navigation/nav.controller.js", "max_forks_repo_name": "Fleeck/ngfire-store", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.0, "max_line_length": 59, "alphanum_fraction": 0.6049382716}
angular.module('bookStore')
  .controller('NavCtrl', function($state, Auth, Users) {
    var navCtrl = this;

    navCtrl.logout = Auth.logout;
    navCtrl.isLoggedIn = Auth.isLoggedIn;
    navCtrl.currentUser = Auth.currentUser;

    Auth.$onAuth(function(authData) {
      if (authData) {
        navCtrl.currentUser = authData;
      }
    });

    navCtrl.selectTab = function(setTab, state, callback) {
      navCtrl.tab = setTab;
      $state.go(state).then(callback),
        function(error) {
          console.log(error);
        };
    };

    navCtrl.isSelected = function(checkTab) {
      return navCtrl.tab === checkTab;
    };
  });
