Check if in a $digest cycle before calling functions through $apply
Merge pull request #53 from whyjustin/master

Check if in a $digest cycle before calling functions through $apply.