Added instructions and tests
Change-Id: I18e491c4a0c188866dcad1f9db52c4f781054e62
diff --git a/views/ngXosViews/UITutorial/src/js/templateHandler.js b/views/ngXosViews/UITutorial/src/js/templateHandler.js
new file mode 100644
index 0000000..752b214
--- /dev/null
+++ b/views/ngXosViews/UITutorial/src/js/templateHandler.js
@@ -0,0 +1,26 @@
+(function () {
+ 'use strict';
+ angular.module('xos.UITutorial')
+ .service('TemplateHandler', function(_){
+
+ this.error = _.template(`<span class="error">[ERROR] <%= msg %></span>`);
+
+ this.instructions = _.template(`
+ <div>
+ <strong><%= title %></strong>
+ <% _.forEach(messages, function(m) { %><p><%= m %></p><% }); %>
+ </div>
+ `);
+
+ this.resourcesResponse = _.template(`
+ <div>
+ <p>Corresponding js code: <code><%= jsCode %></code></p>
+ <div class="json"><%= res %></div>
+ </div>
+ `);
+
+ this.jsonObject = _.template(`<div class="jsonObject"><%= JSON.stringify(obj) %><%=comma%></code></div>`);
+
+ this.jsonCollection = _.template(`<div class="jsonCollection">[<% _.forEach(collection, function(item) { %><%= item %><%}); %>]</div>`);
+ });
+})();
\ No newline at end of file