Sha256: ae7664fcc4596cab32f034dff8b557fe96b18e541a7a7fbb91a4163e79ba26a8

Contents?: true

Size: 526 Bytes

Versions: 2

Compression:

Stored size: 526 Bytes

Contents

'use strict';

angular.module('herald.node', [
  'ngRoute',
  'herald.directives'
])

.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/node/:nodeId', {
    templateUrl: 'node/node.html',
    controller: 'NodeController'
  });
}])

.controller('NodeController', ['$http', '$routeParams', function($http, $routeParams) {
  var ctrl = this;
  ctrl.node = null;

  this.nodeId = $routeParams.nodeId;

  $http.get('/api/v1/node/' + this.nodeId).success(function(data) {
    ctrl.node = data;
  });
}]);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppet-herald-0.1.1 lib/puppet-herald/public/node/node.js
puppet-herald-0.1.0 lib/puppet-herald/public/node/node.js