Расскажите Angular о нестандартном элементе - PullRequest
0 голосов
/ 28 февраля 2019

Я получаю эту ошибку:

   Uncaught Error: Template parse errors:
    ':fb:login-button' is not a known element:
    1. If ':fb:login-button' is an Angular component, then verify that it is part of this module.
    2. If ':fb:login-button' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("data-button-type="login_with" data-auto-logout-link="false" data-use-continue-as="false"></div>
        [ERROR ->]<fb:login-button scope="public_profile,email" onlogin="checkLoginState();"></fb:login-button>

      </ma"): ng:///AppModule/MyNavComponent.html@27:4
        at syntaxError (compiler.js:2427)
        at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:20311)
        at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (compiler.js:25857)
        at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (compiler.js:25844)
        at compiler.js:25787
        at Set.forEach (<anonymous>)
        at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (compiler.js:25787)
        at compiler.js:25697
        at Object.then (compiler.js:2418)
        at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:25696)

ошибка связана с использованием этого html:

<fb:login-button scope="public_profile,email" onlogin="checkLoginState();"></fb:login-button>

этот элемент извлечен из основных примеров для встраивания логина fbна веб-страницу, которую вы можете увидеть здесь:

https://developers.facebook.com/docs/facebook-login/web/#

Кто-нибудь знает, как уменьшить эту ошибку с Angular?

...