Introduce Service view template
This commit is contained in:
parent
dea9bd6521
commit
f3eb0fa831
3
app/templates/service/service.html
Normal file
3
app/templates/service/service.html
Normal file
@ -0,0 +1,3 @@
|
||||
<article ng-controller="ServiceViewCtrl">
|
||||
<adg-service host-name="{{hostName}}" description="{{description}}"></adg-service>
|
||||
</article>
|
13
app/templates/service/service.js
Normal file
13
app/templates/service/service.js
Normal 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");
|
||||
}
|
||||
}]);
|
Loading…
x
Reference in New Issue
Block a user