I just started working on a new project which was started.
The last dev was using vm, and I need to print some data
Here I have the ctrl
(function () {
'use strict';
angular
.module('palpatine')
.controller('RotationsCtrl', RotationsCtrl);
/* @ngInject */
function RotationsCtrl (Rotations, $rootScope, $state) {
/*jshint validthis: true */
var vm = this;
vm.data = Rotations;
console.log(vm.data);
}
})();
than console.log(vm.data) returns an obj like this
[{
"_id": "5653e0fee890e41700946a75",
"name": "Mtg Rotation 112415 - SR",
"group": {
"_id": "563166b302d8831700dfc707",
"object_name": "rotation",
"name": "Mortgage",
"__v": 0,
"updated_on": "2015-10-29T00:22:11.868Z",
"created_on": "2015-10-29T00:22:11.868Z"
}, {
"_id": "5653e0fe946a75",
"name": "Mtg Rotation 112415 - JR",
"group": {
"_id": "700dfc707",
"object_name": "rotation 2",
"name": "Home Mortgage",
"__v": 7,
"updated_on": "2015-10-29T00:22:11.868Z",
"created_on": "2015-10-29T00:22:11.868Z"
}]
all I need is to render that data.name in an ul - li
let's say like this
<ul class="dropdown-menu" dropdown-menu>
<li ng-repeat="datum in vm.data.name">
{{datum}}
</li>
</ul>
what can I do ?