Answer the question
In order to leave comments, you need to log in
How to output attributes from ANGULATJS array in ng-repeat?
there is an array:
'use strict';
var autogenMod = angular.module('autogenMod', ['ngResource']),
app = angular.module('app', ['autogenMod']);
autogenMod.controller('autogenCtrl', function ($scope, $filter) {
$scope.sections = [{
"tag":"section",
"attributes":[
{
"name":"data-type",
"content":"background",
},
{
"name":"data-speed",
"content":"10",
},
{
"name":"class",
"content":"page-image page-a",
},
]
},....];
});
<body ng-controller="autogenCtrl">
<section ng-repeat="section in sections">
</section>
</body>
<section data-type="background" data-speed="10" class="page-image page-a">
</section>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question