I need to display an array of 36 Images (base64) of a car as a 360 Product viewer. I tried my luck with the angular-three-sixty Package by @mediaman, but only got an empty canvas. Does someone have any experience with rotating product galleries in angular?
I just recently started working with Angular. If there is like a jQuery based solution, i wouldn't mind, but i never used jQuery in Angular and i'm not sure how i would implement a jQuery based solution.
So far i installed the package, imported it in my shared module and used it like so:
TS:
imageToShow: string[] = [
0: "data:image/png;charset=utf-8;base64, iVBORw0KGgoA..."
1: "data:image/png;charset=utf-8;base64, iVBORw0KGgoA..."
2: "data:image/png;charset=utf-8;base64, iVBORw0KGgoA..."
3: "data:image/png;charset=utf-8;base64, iVBORw0KGgoA..."
...
];
HTML:
<mm-three-sixty [width]="1280"
[height]="720"
[angles]="36"
[anglesPerImage]="6"
[images]="imageToShow"
[preload]="true">
</mm-three-sixty>
there is an issue on github about the model. i tried this version aswell, but the result was the same.
in the console i always get this error:
ERROR TypeError: Cannot read property 'nativeElement' of undefined at ThreeSixtyComponent.ngOnInit (angular-three-sixty.js:62)
This is the empty canvas:
EDIT:
The comment from Michael D helped getting the error away. The Image is now there and dragable. Unfortunately it doesn't seem to overwrite the image currently displayed, but overlays every new one, when dragged. here is a picture: