Library of Social Shares jsocials
I am trying to use .
npm install jsocials
I installed it in , but I don't know how to use it after this.
The documentation shows how to use jsocials as follows:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="font-awesome.css"/>
<link rel="stylesheet" type="text/css" href="jssocials.css"/>
<link rel="stylesheet" type="text/css" href="jssocials-theme-flat.css"/>
</head>
<body>
<divid="share"></div>
<script src="jquery.js"></script>
<script src="jsocials.min.js"></script>
<script>
$("#share").jsSocials({
shares: ["email", "twitter", "facebook", "googleplus", "linkedin", "pinterest", "stumbleupon", "whatsapp" ]
});
</script>
</body>
</html>
With ionic, I think you will use the module in the import statement.
import {method name, etc} from 'library name'
I think is the syntax, but if you want to use a library like the one above.
What should I write in the {}
of the import statement?
I don't know the specific story of ionic, but jsocials are not provided as JavaScript modules, so I use them as ambient declarations.
You should also need an additional jquery type definition file.npm install@types/jquery
I think I can use the following jsocials.d.ts at least.
interface JsSocials{
(arg:any): any;
}
interface JQuery {
jsSocials —JsSocials;
}
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
578 Understanding How to Configure Google API Key
581 PHP ssh2_scp_send fails to send files as intended
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.