I want to create a series of buttons in a div using ng-repeat. And then for the div to be cloned / duplicated somehow.
Basically, it will look something like this:
[0] [0] [0] [0]
And I also want to make a div that is in the duplicated below. I used to use a clone, but I need to use ng-repeat, and it was not so successful.
<body ng-app="myApp" ng-controller="myCtrl"> ... ... ... <div id="boxHolder"> <span id="musicBox" ng-repeat="x in instrumentBtns"> {{x}} </span> </div>
This is what I have for my html. My app.js file still looks like this.
var app = angular.module("myApp", []); app.controller("myCtrl", function($scope) { $scope.instrumentBtns = [ '<button id="inst0">0</button>', '<button id="inst1">0</button>', '<button id="inst2">0</button>', '<button id="inst3">0</button>', ] });
First post on StackOverflow, so if I donβt get it, let me know! Thanks!
source share