2017-05-12 15 views
0

, 난 가상 키보드를 필요로 전자 응용 프로그램에서 각 2 일 전는 가상 키보드를 <a href="https://github.com/Mottie/Keyboard" rel="nofollow noreferrer">git url</a> 를 사용하려고, 내 Angular2 프로젝트 (각도 CLI)에서

  1. NPM했다 jQuery를 설치

"scripts": [ "../node_modules/jquery/dist/jquery.js" ],

내가 벨로 등의 함수 호출에 키보드 기능이라고 한 angularcli.json 파일

  • 추가 스크립트 w : $("#keyboard").click(function(){ $(this).keyboard(); }); });

    그러나 다음과 같은 오류가 메신저 : This is my screenshot of my error 내 주요 문제가 JQuery와 electron.I가지고 있다고 인식하지 못한 한

  • +0

    대신 다음을 사용하십시오. https://github.com/antonio-spinelli/ng-virtual-keyboard – Mottie

    +0

    안녕하세요,이 가상 키보드를 각도 2와 함께 사용하는 예가 있습니까? – ankita

    +0

    죄송합니다, 모르겠어요 ... 앵귤러 2를 모르므로 여기서는별로 도움이되지 않습니다. – Mottie

    답변

    0
    1. "JQuery와 정의되지 않은"오류. 내 index.html 파일에 다음을 추가하여 그것을 고쳤습니다 :

      <script>if (typeof module === 'object') {window.module = module; module = undefined;}</script> 
      <script src="scripts/jquery.min.js"></script>  
      <script src="scripts/vendor.js"></script>  
      <script>if (window.module) module = window.module;</script> 
      
    2. 이 수정 된 내 Jquery 오류. 그런 다음이 github 링크에 제시된 단계에 따라 키보드를 https://github.com/antonio-spinelli/ng-virtual-keyboard에서 사용할 수 있습니다.