javascript - Angular JS Objects vs Array -


i trying create object 3 properties inside. however, every time run code display code expression. how array , objects affect each other?

my code:

var app = angular.module("fundallocation", []);   app.controller("myctrl", function($scope) {  	$scope.allocfunds = [{name:'groceries',allfunds:'2'},  							 {name:'travel',allfunds:'2'},  							 {name:'house',allfunds:'2'}  							];  });	

<div ng-app="app" ng-controller="myctrl">    <div ng-repeat="row in allocfunds">      row: {{row.name}    </div>  </div>`

you missing second curly brace in html {{row.name}. missing curly brace won't display errors , display literally is, in case "{{row.name}". rest of code seems fine , should work.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -