GUI -- Completed icon directive definition, and wired up device view.

Change-Id: Ia3cf0655fb17d47adc54f9f4540bb25eacbaaa62
diff --git a/web/gui/src/main/webapp/app/directives.js b/web/gui/src/main/webapp/app/directives.js
index 7d574d5..9cbcf6d 100644
--- a/web/gui/src/main/webapp/app/directives.js
+++ b/web/gui/src/main/webapp/app/directives.js
@@ -59,20 +59,16 @@
 
         // create icon directive, so that we can inject icons into
         // HTML tables etc.
-        .directive('icon', ['GlyphService', function (gs) {
+        .directive('icon', ['IconService', function (is) {
             return {
-                templateUrl: 'toBeDecided-iconContext.html',
                 restrict: 'A',
+                scope: {
+                    iconId: '@'
+                },
                 link: function (scope, element, attrs) {
-                    // TODO: implement this
-                    // needs to pull out the parameters for the icon
-                    // from the attributes of the element, and use those
-                    // as arguments to the IconService.addIcon(...) call.
-
-
+                    is.loadEmbeddedIcon(d3.select(element[0]), scope.iconId);
                 }
             };
 
-
         }]);
 }());