28 Apr '15, 8am

"Reduce Your AngularJS Code and Improve its Readability Using ECMAScript 6" #javascript

"Reduce Your AngularJS Code and Improve its Readability Using ECMAScript 6" #javascript

This function uses two of the new features of ECMAScript 6, namely block-scoped bindings, and arrow, or lambda functions. The handleSuccess and handleError functions above are declared using the let keyword, which restricts them to only being accessible by code in the same block; in this case, the else block of our if-else statement. This increases the overall readability of our code by moving variable or function declarations and assignments into the block where they’re intended to be used. Both handlers make use of arrow functions which provide a shorthand, expressive syntax for defining functions. In addition to providing a more compact syntax for defining functions, arrow functions also lexically bind the “this” keyword value, eliminating the need to manually bind object context when registering event handlers and such.

Full article: http://www.intridea.com/blog/2015/4/28/reduce-your-angula...

Tweets

Fresh Ruby on Rails, JavaScript & AngularJS Talent Seeks Startup

Fresh Ruby on Rails, JavaScript & AngularJS Tal...

hypepotamus.com 28 Apr '15, 6pm

Share this: Bennett Adams just finished the Web Development Immersive course at General Assembly , a 12-week, full-time co...

How to build single page app with #rubyonrails and #AngularJS

How to build single page app with #rubyonrails ...

thecalmcoder.com 28 Apr '15, 9am

[PART 1] How to build a single page application with Ruby on Rails and AngularJS This is the first part of the tutorial in...

6 Content Tips for Adapting to the Post-Mobileg...

searchenginewatch.com 27 Apr '15, 1pm

The official date of Mobilegeddon has come and gone, but the impact of mobile-friendliness for search marketers will still...

Meet our Google Summer of Code students and men...

weblog.rubyonrails.org 02 May '15, 1am

The goal of Andrei's project is to give you good inspecting and debugging capabilities in environments where your code goe...