@ -28,6 +28,8 @@
function apiV3Config(apiV3, halTransform) {
apiV3.addResponseInterceptor((data, operation, what) => {
data.$plain = angular.copy(data);
apiV3.addElementTransformer(what, halTransform);
if (data && data._type === 'Collection') {
@ -47,7 +47,7 @@ function halResource(halTransform, HalLink, $q) {
}
constructor(protected $source, public $loaded = true) {
var source = $source.restangularized ? $source.plain() : angular.copy($source);
var source = angular.copy($source.restangularized ? $source.$plain : $source);
this.$links = this.transformLinks();
this.$embedded = this.transformEmbedded();