ng-click Function is call but the array data are not show In the HTML page in AngularJS?

16 views
Skip to first unread message

Kapil Soni

unread,
Aug 17, 2017, 12:33:14 PM8/17/17
to Angular and AngularJS discussion
Hello sir,
I have to call the getUserCategory function on the tab in  my case function is call and response is properly received but data are not updated
in the HTML( view) section and not show any data in view.sir please tell me what's the problem in my code? 
/**
 * @Summary:getUserCategory function, to get the User selected Category.
 * @param:   callback
 * @return:  callback(response) .
 * @Description: 
 */
//Defining function for getUserProfile in service 
$scope.getUserCategory = function () {
    var data = {
        userTypeKeyId: Number(AUTH.userTypeKeyId),
        fieldKeyId: Number(AUTH.defaultFieldKeyId)
    };
    IntermediaryDashboardService.getIntCategory(function (response) {
        if (response != null) {
            if (response.data.isSuccess) {
                $scope.userCategories = response.data.userCategories;
            }
        }
    }, data);
};

//HERE WE WILL DISPLAY THE DATA
 <ul ng-repeat="category in userCategories" class="ng-cloak">
  <li style=" padding-top: 11px;">
    <a href="#" ng-click="getAlbumInIntermediary(category.categoryKeyId)">
      {{category.categoriesDto.categoryName}}
    </a>
  </li>
</ul>

Tito

unread,
Aug 17, 2017, 2:14:19 PM8/17/17
to Angular and AngularJS discussion
hello,

What is the following ? Where is this data coming from ?

{{category.categoriesDto.categoryName}}

Kapil Soni

unread,
Aug 18, 2017, 3:56:42 AM8/18/17
to ang...@googlegroups.com
Hello ,
category in userCategories here:- userCategories is an array and i have hold into the category.
{{category.categoriesDto.categoryName}} here i will print the category Name


--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Gary Rusher

unread,
Aug 20, 2017, 5:15:10 AM8/20/17
to Angular and AngularJS discussion
is
IntermediaryDashboardService.getIntCategory returning a promise?


Reply all
Reply to author
Forward
0 new messages