360 image viewer


#1

Hello I’m creating an app to display a 360 image, I use this library, this is a dependency that when I import it gives me an error. D.js
I import the bookstore this way

npm install d.js --save
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {D.js} from 'd.js/lib/D';
import {PhotoSphereViewer} from 'photo-sphere-viewer/dist/photo-sphere-viewer';

@Component({
  selector: 'page-contact',
  templateUrl: 'contact.html'
})
export class ContactPage {

  constructor(public navCtrl: NavController) {
    var viewer:any = PhotoSphereViewer({
      container: 'container-img',
      panorama: 'assets/images/zzbas03.png'
    });
  }
}

this is the error : [ts] ',' expected.


#2

Is there a particular reason you’re bothering with this D.js at all? Its documentation says it’s A+ compliant, so I would think you could just treat it as a Promise.


#3

There is no reason, it is that I am very new, I do not know how to make it work


#4

Then what happens if you take that import line out?


#5

Did you get any solution?