Bower package manager in 3 steps

Wednesday, December 17, 2014

Why do I need it Lets say I have a web app that depends on Angular. I need to download angular.js, angular.min.js, and maybe a gzip version. Also I might need to download a few dependencies such as angular-route and angular-ui, store them in my source control and make sure the versions match. Also, I use google-map for angular, which depends on a specific angular version, among jquery version and other. I need to download and store them all and to make sure the versions doesn't collide. Bower solves dependencies and downloads them for you. Just like nuget does. Why not...
tags: , ,
no comments

Angular: Why Should You Care About $destroy when $timeout

Wednesday, October 29, 2014

$timeout is a service that is used to invoke a function after a given amount of time. For example, invoking an alert("hello world") call after 1000 milliseconds would look as following: $timeout – when will it stop? But, have you ever consider what happens with the timeout call when you leave the page your in? Let's say the user clicks on a link and moves into a different ng-view that has a new controller. Will the $timeout call still be fire, calling your function unexpectedly even after the user has left the page? It seems the $timeout call will still be invoked, even...
tags: ,
no comments