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-5f28700610c74286783071 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-5f28700610c74286783071 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…
Coding CommunityE-Learning

Livecoding.tv Quiz of the Day: 17/10/2016

Answer: 1. Encapsulation Encapsulation is a mechanism by which developer could hide implementation behind an interface. Encapsulated code has two features: Instance variables are kept protected (usually with the private modifier). Getter and setter methods provide access…