Created
June 7, 2013 21:49
-
-
Save hhariri/5732657 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
app.directive('projectLocator', function () { | |
return { | |
restrict: 'E', | |
scope: { | |
}, | |
templateUrl: '/partials/projectLocator.html', | |
controller: function ($scope, $resource) { | |
$scope.selectd = undefined; | |
$scope.message = 'loading projects...'; | |
$resource('/teamcity/projects').query(function (result) { | |
$scope.projects = result; | |
$scope.message = ''; | |
}); | |
} | |
}; | |
}); | |
<div class='container-fluid'> | |
<p>Go to Project</p> | |
<input type="text" value="{{message}}" ng-model="selected" typeahead="project.name for project in projects | filter: $viewValue"> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment