Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property 'config' is private and only accessible within class 'PanZoomComponent' #9

Open
codegastudio opened this issue Feb 4, 2021 · 0 comments

Comments

@codegastudio
Copy link

Hello,

i am not able to use your component cause during compilation i had the following error :
Property 'config' is private and only accessible within class 'PanZoomComponent'

client:159 src/app/shared/components/pictures/picture-markers/picture-markers.component.html:2:14 - error TS2341: Property 'config' is private and only accessible within class 'PanZoomComponent'.

2   <pan-zoom [config]="panZoomConfig">
               ~~~~~~

  src/app/shared/components/pictures/picture-markers/picture-markers.component.ts:6:16
    6   templateUrl: './picture-markers.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component PictureMarkersComponent.
import {Component, Input, OnInit} from '@angular/core';
import {PanZoomConfig} from 'ngx-panzoom';

@Component({
  selector: 'app-picture-markers',
  templateUrl: './picture-markers.component.html',
  styleUrls: ['./picture-markers.component.scss'],
})
export class PictureMarkersComponent implements OnInit {

  @Input('imagePath') imagePath: string | undefined;
  panZoomConfig: PanZoomConfig = new PanZoomConfig();

  constructor() { }

  ngOnInit(): void {

  }
}
<div>
  <pan-zoom [config]="panZoomConfig">
    <div style="position: relative;">
      <img [src]="imagePath" />
    </div>
  </pan-zoom>
</div>

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant