How to pass json varaible in controller AngularJS -


i new angularjs. have doubts. have json data value in 1 variable. how use varaible in controller ? example

$scope.paresejson($scope.productresult); 

in productresult have values brand, size , color. if console console.log("prdmake" , prdmake); getting brand values.

how pass variable in controller ?

$scope.items = [                  {                     name: "item1",                     desc: "shop brand",                     subitems:                          {                             name: "subitem1",                             desc: "prdmake"                         }                  }]; 

i want use prdmake (json variable) in subitems desc:

you can use $scope.items.name value, in 1.4 should work $scope.items[name]


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -