My current project involves implementing Google Login and Jquery in Typescript. I have ensured that the necessary files are included in the project: jquery.min and the import of Google using
<script defer src="https://apis.google.com/js/platform.js"></script>
In my component, I have added the following:
declare var gapi: any;
declare var $: any;
Despite this, I continue to encounter an error when running ng serve
:
The error message states "Cannot find namespace 'gapi'."
Could anyone provide guidance on properly referencing or importing external JavaScript libraries/namespaces/functions in Angular 4 with Typescript?