告诉Angular自定义元素

时间:2019-02-28 04:15:08

标签: html5 facebook-javascript-sdk angular7

我收到此错误:

   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的错误吗?

0 个答案:

没有答案