You sure you mean Ng2? this code looks like Ng1 to me, Ng2 deleted the use 
of the '$scope' variable, anyway the use is not that complex, just import 
the lodash function you need and replace it where you need it:
angular.forEach(data, (record) => {...})
// If using the global way
_.each(data, (record) => {...})
// If using the specific import
each(data, (record) => {...})

The importing is up to your build process, if Ng1 most likely you just add 
a script tag up in the html before your script tags, in Ng2 it can be done 
the same, or you can import just that specific function.

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to