bug 1
p.promise, not p
ng-show and hide conflict