You're basically rewriting the $parse service at the moment, when you could just use it :-)