Tuesday, 23 December 2014

AngulaJS $timeout example

$scope.statusMessage = true;
          $timeout(function() {
              $scope.statusMessage = true;
          }, 2000); 

Saturday, 20 December 2014

Clone all branches with Git


clone project by 
git clone git://example.com/myproject

navigate project directory 
$ cd myproject

Check All branches
git branch -a

check out as
git checkout branchname

do like 
$ gitk --all &

to get all branch 

REF : http://stackoverflow.com/questions/67699/clone-all-remote-branches-with-git

GIT Checkout with different

check out from branch somebranchname

git fetch && git checkout somebranchname

Merge GIT branch[es] to Master branch


git checkout master
git pull
git checkout yourBranch
git merge master

Tuesday, 16 December 2014

Get Image Dimension Before upload with angularjs

var _URL = window.URL || window.webkitURL;
         
var image, file;

          if ((file = $files[0])) {
            image = new Image();
            image.onload = function() {
                $scope.$apply(function() {
                  alert(image.width);
                });
            };

image.src = _URL.createObjectURL(file);