Loading - Implement the 'duration' with interval instead of timeout


I’ve come across an issue while testing my Ionic application where Protractor was not able to asynchronously wait for the $ionicLoading dialog to appear - see my StackOverflow question. It’s caused by the fact that Protractor does has certain reasons for not testing while $timeout is active, and that the “duration” property of the loading object is implemented with timeout.

Would it be useful if I re-implemented the duration to work with $interval instead of $timeout? It would be awesome to do a pull request for the feature.

Otherwise, if the there are complications or if this is really an issue that Protractor should fix, I’ll just steer clear.