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 '_animationState' is private and only accessible within class 'MatKeyboardContainerComponent' #96

Open
alxpsr opened this issue Oct 18, 2019 · 3 comments

Comments

@alxpsr
Copy link

alxpsr commented Oct 18, 2019

Package version: 0.1.1

If set "fullTemplateCheck": "true" in tsconfig.json i will got an error Property '_animationState' is private and only accessible within class 'MatKeyboardContainerComponent'

Problem is here:

// ngx-material-keyboard\src\core\src\components\keyboard-container\keyboard-container.component.ts

@HostBinding('@state')
private _animationState: KeyboardAnimationState = KeyboardAnimationState.Void;

This HostBinder used outside of MatKeyboardContainerComponent

@stebigs
Copy link

stebigs commented Jan 14, 2020

Hello everyone, same problem here. I am using angular 8. Any idea on how to fix it?

@alxpsr
Copy link
Author

alxpsr commented Jan 14, 2020

apply this patch

const fs = require('fs');
const path = require('path');
const PATH_TO_FILE = path.join(__dirname, '../../node_modules/@ngx-material-keyboard/core/components/keyboard-container/keyboard-container.component.d.ts');

fs.readFile(PATH_TO_FILE, 'utf8', (err, data) => {
    if (err) {
        console.error(err);
        return;
    }

    const result = data.replace('private _animationState', 'public _animationState');

    fs.writeFile(PATH_TO_FILE, result, (err) => {
        if (err) {
            console.error('PATCH FAIL', err);
            return;
        }

        console.info('PATCH SUCCESS');
    });
})

@mgierw
Copy link

mgierw commented Aug 14, 2020

Is there a chance that this problem will be fixed in lib code? Identical problem is with methods _showKeyboard and _hideKeyboard.

Thx in advance.

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

3 participants