https://github.com/angular-ui/angular-ui/pull/396/files#L0R105