Skip to content

Instantly share code, notes, and snippets.

@wlach
Created October 23, 2014 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wlach/42f6825a478f18824727 to your computer and use it in GitHub Desktop.
Save wlach/42f6825a478f18824727 to your computer and use it in GitHub Desktop.
var perf = angular.module("perf", ['ngResource', 'ngRoute']);
perf.controller('PerfCtrl', [
'$scope', '$http', '$rootScope', '$routeParams', '$location',
function PerfCtrl($scope, $http, $rootScope, $routeParams,
$location) {
$scope.repos = [
{ 'name': 'mozilla-central' },
{ 'name': 'mozilla-inbound' },
{ 'name': 'fx-team' }
];
// set the default repo to mozilla-central if not specified
if ($routeParams.hasOwnProperty("repo") &&
$routeParams.repo !== "") {
$scope.repoName = $routeParams.repo;
} else {
$scope.repoName = 'mozilla-central';
$location.search("repo", $scope.repoName);
}
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment