BusinessesE-Learning

Livecoding.tv Quiz of the Day: 23/11/2016

React.JS Quiz   Answer: Higher Order Components (HOCs) are the coined term for a custom Component that accepts dynamically provided children. For example, let’s make <LazyLoad /> Component that takes child image tags as children, waits…
BusinessesCoding Community

Livecoding.tv Quiz of the Day: 02/11/2016

Angular.JS Quiz Answer: The key to both is assigning the result of the function to a variable. To cleanup the timeout, just “.cancel()” it: [crayon-5e8ea8cf82203470072305 inline="true" class="language-js hljs"]<span class="hljs-keyword">var</span> customTimeout = $timeout(<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">()</span> {</span> <span class="hljs-comment">// arbitrary code</span> }, <span class="hljs-number">55</span>); $timeout.cancel(customTimeout); 12345 [crayon-5e8ea8cf82203470072305 inline="true"  class="language-js hljs"]<span class="hljs-keyword">var</span> customTimeout = $timeout(<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">()</span> {</span>  <span class="hljs-comment">// arbitrary code</span>}, <span class="hljs-number">55</span>); $timeout.cancel(customTimeout); [/crayon] The same applies to “$interval()”. To disable a watch, just…