I want to create a row of buttons in a div using ng-repeat. And then have that div be cloned/duplicated in some way.
Basically so it'll look something like this;
[0][0][0][0]
And I'd also want to make the div that that is in duplicated below. I used clone before, but I need to be using ng-repeat and that wasn't as 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 so far 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 to StackOverflow, so if I wasn't clear please let me know! Thanks!
<span ng-repeat="x in instrumentBtns"><button ng-attr-id="{{'instr' + x}}">0</button></span>