Refactoring ADB add keys to its own directive so it can be shared.

This commit is contained in:
Gunther Brunner
2014-09-29 18:37:28 +09:00
parent 13d40a4649
commit 9d38bced21
8 changed files with 48 additions and 82 deletions

View File

@@ -1,7 +1,5 @@
module.exports = function AdbKeysCtrl($scope, AdbKeysService) {
$scope.adbKeys = [
{
title: 'PC1264',
@@ -20,14 +18,4 @@ module.exports = function AdbKeysCtrl($scope, AdbKeysService) {
$scope.toggleAddKey = function () {
$scope.showAdd = !$scope.showAdd
}
$scope.$watch('key', function (newValue) {
if (newValue && !$scope.title) {
$scope.title = AdbKeysService.hostNameFromKey(newValue)
}
})
}