From 8fcae6810e02c0ad8af6895aac64ddcf6c94afe5 Mon Sep 17 00:00:00 2001 From: Rob McFadzean Date: Tue, 22 Nov 2016 10:51:36 +1030 Subject: [PATCH] fix(templates): fixes an issue regarding template selection when paged --- app/components/templates/templates.html | 2 +- app/components/templates/templatesController.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/components/templates/templates.html b/app/components/templates/templates.html index 866c540f4..49ef933c1 100644 --- a/app/components/templates/templates.html +++ b/app/components/templates/templates.html @@ -121,7 +121,7 @@
-
+
{{ tpl.title }}
{{ tpl.description }}
diff --git a/app/components/templates/templatesController.js b/app/components/templates/templatesController.js index 3faaf3d08..1d442a9a3 100644 --- a/app/components/templates/templatesController.js +++ b/app/components/templates/templatesController.js @@ -184,7 +184,10 @@ function ($scope, $q, $state, $filter, Config, Info, Container, ContainerHelper, function initTemplates() { Templates.get(function (data) { - $scope.templates = data; + $scope.templates = data.map(function(tpl,index){ + tpl.index = index; + return tpl; + }); $('#loadTemplatesSpinner').hide(); }, function (e) { $('#loadTemplatesSpinner').hide();