Introduce Service view template

This commit is contained in:
Frédéric Vachon 2015-03-30 11:42:19 -04:00
parent dea9bd6521
commit f3eb0fa831
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<article ng-controller="ServiceViewCtrl">
<adg-service host-name="{{hostName}}" description="{{description}}"></adg-service>
</article>

View File

@ -0,0 +1,13 @@
'use strict';
angular.module('adagios.view.service', ['adagios.live'])
.controller('ServiceViewCtrl', ['$scope', '$routeParams',
function ($scope, $routeParams) {
if (!!$routeParams.host_name && !!$routeParams.description) {
$scope.hostName = $routeParams.host_name;
$scope.description = $routeParams.description;
} else {
throw new Error("ERROR :'host_name' and 'description' GET parameters must be set");
}
}]);