On Friday, July 28, 2017 at 3:37:51 PM UTC+5:30, [email protected] wrote: > > Hello sir i have to call function for get the list of albums but in my > case ng-click is not working no action will be performed what's wrong in my > code? > > //Our controller code here > /** > * @Summary: getAlbumsBySellerUserTypeKeyId function, get the > productsAlbum list > * @param: NA > * @return: allAlbums > * @Description: > */ > $scope.allAlbums = []; > $scope.sellerUserTypeKeyId = []; > $scope.getAlbumsBySellerUserTypeKeyId = function() { > //Enable class fadeAndDisable call the > getAlbumsBySellerUserTypeKeyId() function > $("#loadingAlbums").toggleClass("fadeAndDisable", true); > > $scope.sellerUserTypeKeyId = Number(AUTH.userTypeKeyId); > var PRODUCT_DB_REF = > firebase.database().ref('datastore/productsAlbum'); > > > //Re-enable class fadeAndDisable after response is received > $("#loadingAlbums").toggleClass("fadeAndDisable", false); > > > PRODUCT_DB_REF.orderByChild("sellerUserTypeKeyId").equalTo($scope.sellerUserTypeKeyId) > .on("value", function(snapshot) { > var value = snapshot.val(); > if(value != null) { > $scope.allAlbums = objToArray(value); > //USED FOR SET THE ALBUM LENGTH IN THE ALBUM > TABS SECTION > $rootScope.allAlbums = $scope.allAlbums; > } > }); > } > > //This is our HTML Code > > <li class="ng-cloak"> > <a href="javascript:void(0)" onclick="openPageTab(event, > 'createAlbum')" > ng-click="getAlbumsBySellerUserTypeKeyId()"> > Album > <span ng-if="allAlbums.length > 0">({{allAlbums.length}})</span> > </a> > </li> > > You can call two or more function on ng-click="function1(); function2()" from > controller > >
-- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
