the term MVC should help on answer that. separation of concerns
controllers could be embedded in html but best practice would be to have 
them separated. so I would go with the first approach.


On Thursday, March 8, 2018 at 12:15:20 PM UTC-8, Hameed Gamal wrote:
>
> <!-- template.html --><div ng-if="items.length > 0">
>     <!-- content --></div>
>
> vs
>
> <!-- template.html --><div ng-if="$ctrt.hasItems()">
>     <!-- content --></div>
> <!-- controller.js -->
> $ctrt.hasItems = (itmesList) => {
>     return items.length > 0
> };
>
> which way is better, doing the evaluation in javascript or in the HTML 
> template?
>

-- 
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.

Reply via email to