feature issue: $state injection into resolve function gives old state #238