fix(minErr): use internals API

This commit fixes issues introduced in 8425e9fe383c17f6a5589c778658c5fc0570ae8f and 94764ee08910726db1db7a1101c3001500306dea commits:
references to internals API (except angular.toJson) were removed.
Considering the state of angular-loader, I propose to use angular API in minErr to simplify code and provide this API in angular-loader.