try this:

productDetailsApp.controller('productDetailsCtrl', function ($scope, 
productDetailsService) {
    $scope.stransferAmount = 2000;
    $scope.sAPR = 17.9;
    $scope.productDetails = [];
    productDetailsService.getProductDetails().then(function (prodDetails) {
        $scope.productDetails = prodDetails;
        //console.log(items);
    }),
        function () {
            //error
        };});





On Friday, February 21, 2014 5:29:41 PM UTC+1, Zaki Noori wrote:
>
> I am new to angular so bare with me please.
>
> I am using dynamic objects to create properties and want to send this to 
> angular to display in table rows.
>
> here is my code to create dynamic objects and serialize to Json(it is cut 
> down version):
>
> List lstDynamic = new List();
>
> foreach (var Prods in ProdList){dynamic dobject = new 
> System.Dynamic.ExpandoObject();  SetDynamicProperty(displayAttribute, 
> dobject);var json = JsonConvert.SerializeObject(dobject);
> lstDynamic.Add(json);}
>
> my data at end looks like this :
>
> [image: enter image description here]
>
> and in angular
>
> productDetailsApp.controller('productDetailsCtrl', function ($scope, 
> productDetailsService) {
>     $scope.stransferAmount = 2000;
>     $scope.sAPR = 17.9;
>     var items = [];
>     productDetailsService.getProductDetails().then(function (prodDetails) {
>         items = prodDetails;
>         $scope.productDetails = items;
>         //console.log(items);
>     }),
>         function () {
>             //error
>         };});
>
> And in html :
>
>    <tbody>
>       <tr data-ng-repeat="attNameValue in productDetails">
>         <td>
>          {{attNameValue.APR}}
>         </td>
>       </tr>
>    </tbody>
>
> But still nothing gets displayed, I can see two table rows but no data, I 
> can see my objects in chrome browser console too. Am I missing something?
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to