Giter Site home page Giter Site logo

angular-three-sixty's People

Contributors

r4c00n avatar webri avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

angular-three-sixty's Issues

_this.images.forEach is not a function

Hi

I tried out the below sample code to start with a basic example.

Importing library

You need to import the module in your application:

import { NgModule } from '@angular/core';
import { ThreeSixtyModule } from '@mediaman/angular-three-sixty';

@NgModule({
    imports: [ThreeSixtyModule]
});
export class AppModule {
}

Usage

Basic usage

import { Component } from '@angular/core';

@Component({
    selector: 'product-page',
    template: `<mm-three-sixty [width]="1280"
                [height]="720"
                [angles]="36" 
                [anglesPerImage]="6" 
                [images]="threeSixtyImages" 
                [preload]="true"></mm-three-sixty>`
})
export class ProductPageComponent {
    public threeSixtyImages: string[] = [
        '/assets/360/my-image-0.jpg',
        '/assets/360/my-image-1.jpg',
        '/assets/360/my-image-2.jpg',
        '/assets/360/my-image-3.jpg',
        '/assets/360/my-image-4.jpg',
        '/assets/360/my-image-5.jpg',
    ];
}

But I ran into the following error:

ERROR Error: "Uncaught (in promise): TypeError: this.images.forEach is not a function
./node_modules/@mediaman/three-sixty/dist/three-sixty.es5.js/ThreeSixty.prototype.preload/...

I imported the Module correctly and i am pretty sure I've done it right.

Could you fix this bug or help me if I'm doing something wrong?

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.