I am training with html and angular, and I want to create a memory game.
I have an array of 16(8*2) images, and I am looking for an easy way to display those images in a table structure.
var app = angular.module('memoryGame', []);
app.controller('gameCtrl', function ($scope) {
$scope.gary = "images/Gary.png";
$scope.larry = "images/Larry.png";
$scope.mrkrabs = "images/MrKrabs.jpg";
$scope.patrick = "images/Patrick.png";
$scope.plankton = "images/Plankton.JPG";
$scope.sandy = "images/Sandy.jpeg";
$scope.spongebob = "images/Spongebob.png";
$scope.squidward = "images/Squidward.jpg";
$scope.cards = [$scope.gary, $scope.larry, $scope.mrkrabs,
$scope.patrick, $scope.plankton, $scope.sandy,
$scope.spongebob, $scope.squidward];
Array.prototype.push.apply($scope.cards, $scope.cards);
How can I use ng-repeat and ng-table to display this array in 4*4 matrix?
(I will sort out later how to suffle the array :) )