Created
October 23, 2014 22:48
-
-
Save wlach/42f6825a478f18824727 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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