Hi Paul,
couple of things,
First and most important! do not repeat over a function result.
ng-repeat="item in itemsInGroup('Lights') track by $index" ng-if="$index %
3 == 0" class="row"
This function will be called on every digest cycle. Also, it might cause
infinite loop error's if the result of it grows.
It's a better idea to do this in your controller, and use the result of the
function.
The following is your use of ngInit. It may be used like this, but a better
idea would be to let your widget-switch component take care of that. You
can use input and output bindings to take care of the parameter
<https://docs.angularjs.org/guide/component> handling.
<widget-switch lightning-Option="item.label"></widget-switch>
In case you can not change the 'widge-switch', you can create a small
directive that handles this 'conversion'
Also, do yourself a favour, and read the style-guide
<https://github.com/johnpapa/angular-styleguide> thoroughly.
Regards
Sander
--
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.