Validated if the object returned from the service is coming as an array? Because I did a simple dropdown cascade and works perfectly,
Qualquer dúvida estarei a disposição, Abs. Cauê Alves - TI (021) 9 9908-8778 Desenvolvedor Back-End ----------------------------------------------- Seja fã no Facebook http://www.facebook.com/pages/Personare/102612499944?ref=ts Personare no Twitter http://twitter.com/Personare Personare no Linked in http://www.linkedin.com/company/personare-com-br 2015-03-09 9:06 GMT-03:00 basil farraj <[email protected]>: > Hello, thanks for the reply. > This is my controller so far: > The $scope.ChangeDevice is my ng-change event function > > > > 'use strict'; > app.controller("pricingController", ['$scope','$location', > 'pricingService', 'toastr','$compile', function ($scope,$location, > pricingService, toastr,$compile) { > > > $scope.id = $location.search().id;//get querystring > > pricingService.getPackageDetails($scope.id).then(function (results) { > $scope.packageDetails = results.data; > }); > pricingService.getDevices().then(function (results) { > $scope.devices = results.data; > }); > $scope.ChangeDevice = function (device) { > pricingService.getDeviceVersions(device.id).then(function (results > ) { > $scope.deviceVersions= results.data; > }); > > > }; > > }]); > > Thanks > > On Monday, March 9, 2015 at 2:01:07 PM UTC+2, Cauê Alves Braz wrote: >> >> Hello Basil, how are you? >> >> You could show me how is the controller? >> >> Thank you. >> >> >> Qualquer dúvida estarei a disposição, >> >> Abs. >> >> Cauê Alves - TI >> (021) 9 9908-8778 >> Desenvolvedor Back-End >> ----------------------------------------------- >> >> Seja fã no Facebook >> >> http://www.facebook.com/pages/Personare/102612499944?ref=ts >> >> >> >> Personare no Twitter >> >> http://twitter.com/Personare >> >> Personare no Linked in >> http://www.linkedin.com/company/personare-com-br >> >> 2015-03-09 8:05 GMT-03:00 basil farraj <[email protected]>: >> >>> Hi, >>> I'm trying to clone a cascading dropdowns that are populated >>> using data-ng-options with a ng-change event on the first one that should >>> fill the second drop down accordingly. >>> I also have a dropdown that should set the number of the cascading >>> dropdown clones. >>> I want also to insert the #number of the device under each dropdowns >>> pair. >>> >>> my html for one cascading dropdowns pair is: >>> >>> <div class="row deviceRow" id="deviceRow"> >>> >>> >>> <h4>device #<label class="deviceRowCounter"></ >>> label></h4> >>> <div class="col-lg-6 floatRight"> >>> <div class="form-group"> >>> <label for="">device company</label> >>> <select data-ng-options="o.deviceCompany >>> for o in devices track by o.id" data-ng-model="deviceObj.id" >>> class="form-control >>> deviceType" ng-change="ChangeDevice(deviceObj.id)"> >>> <option value="">Choose device >>> company</option> >>> </select> >>> >>> </div> >>> </div> >>> <div class="col-lg-6 floatRight"> >>> <div class="form-group"> >>> <label for="">device version</label> >>> <select data-ng-options="o.deviceVersion >>> for o in deviceVersions track by o.deviceVersion" data-ng-model=" >>> deviceVersionObj.id" class="form-control deviceType"> >>> <option value="">choose device >>> version</option> >>> </select> >>> </div> >>> </div> >>> </div> >>> >>> any idea on how to accomplish this? >>> Thank you >>> >>> -- >>> 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/d/optout. >>> >> >> -- > 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/d/optout. > -- 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/d/optout.
