Json – Angularjs sort and number format

orderBy Returns an array containing the items from the specified collection, ordered by a comparator function based on the values computed using the expression predicate. The default comparator The default, built-in comparator should be sufficient for most usecases. In short, it compares numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to using their …

Continue reading

Angularjs Best Practices

1. How To Make ‘ng-click’ Conditional? Say you have an element that must always be visible, no matter if the user is logged in or not. If the user is logged in, the element needs to be clickable. Example pseudo code would look like this:

Unfortunately, ng-if is not an option. If ng-if is …

Continue reading

[Note] AngularJS

1. What is Angular JS? A client-side JavaScript Framework for adding interactivity to HTML. Modules Where we write pieces of our Angular application. Makes our code more maintainable, testable, and readable. Where we define dependencies for our app. Directives: HTML annotations that trigger Javascript behaviors (A Directive is a marker on a HTML tag that …

Continue reading