Muhammad Hassan 5/18/2017

Underscore.JS: Access local variables and function inside each function of UnderscoreJS in Typescript

Read Original

This article explains a common problem in TypeScript/AngularJS development where the 'this' context is lost inside Underscore.js helper functions like _.each. It provides two solutions: passing 'this' as the third parameter to _.each or saving the context in a temporary variable before the loop.

Underscore.JS: Access local variables and function inside each function of UnderscoreJS in Typescript

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week