Hi Carlos ,
i am using ng-repeat code outside, this is table td record .
i want show 10 more record from server-side data in table row and each
column having the select drop down.
Each drop down value fetching from server side . so i want show the loading
icon . i have tried ng-show ,if i use that ,i want write different method
each column . It is increase the code complexity . can you please explain
how to use the all the column in single ng-show method .
On Monday, 21 July 2014 21:13:32 UTC+5:30, Carlos Figueiredo wrote:
>
> That code is inside a ng-repeat loop?
>
> You are trying to pass $index to your ng-init function, and I'm not sure
> it exists when you are calling it, because ng-options does not declare
> $index, who does that is ng-repeat...
>
> I also have some issues you could improve your code.
>
> Firstly:
> You could define some function that returns a boolean and use ng-show to
> control if show or not the loading icon... it's cleaner than that code you
> show us. You are bloating you ng-init function with a lot of responsibility
> unnecessarily.
>
> Secondly:
> Try not use ng-init when you use a controller... it has a huge priority
> and is usually used to call a function that pass some data or do some logic
> when the controller is instantiated.
>
>
>
> On Monday, July 21, 2014 11:36:07 AM UTC-3, Diwan Oli M wrote:
>>
>> Hi Angulars,
>> I am facing some issue in angular . i am little confuse
>> use the angular . can you please rectify the problem
>>
>> <td class="tms-border-grey-1"><select class="model_fromPhase_class"
>> ng-model="modelcntntChange.fromPhaseCode" ng-options="phase.code for phase
>> in modelcntntChange.fromphasecodeList"
>> ng-change="changeFromPhaseCode(modelcntntChange)"
>> name="model_fromPhase_{{$index}}" id="model_fromPhase_{{$index}}"
>> ng-init="populateFromPhaseForModel(modelcntntChange,$index)" ><option
>> value="">SELECT</option></select><div
>> id="modelDataform_fromPhase_{{$index}}_Loading" class="tms-display-none
>> tms-rfloat"><img title="Loading" alt="Loading"
>> src="static/images/menu-loader.gif" ></div></td>
>>
>> $scope.populateFromPhaseForModel = function(scopeObj,_element){
>>
>> $('#modelDataform_fromPhase_'+_element+'_Loading').show();
>> .... Some Logic display the Initial record
>> }
>> I want display the loading Icon . But i am getting the empty object
>>
>
--
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.