Examples of usage examples for array objects in angularjs

125 4
 self.getNoteClass = function(status) {
 return {
 done: status,

I've encountered such a usage in the book, and the incoming parameter must be true or false, and then pass in true to return done, false to return pending.
I'm going to say that this usage is a special use in angularjs. If you don't understand, please, please. Thank you.
Ps: here's an example of my own writing, which is a simpler and easier way to understand.

self.getClassname = function(string) {
 var obj = {
 '1' : even,
 '2' : odd
 return obj[string];
1 Answers

87 0

I guess this is meant to be used in conjunction with the ng-class.

A you may see the document document for ng-class.