I need to know how to implement the below script in my angular index.html file
<script src='node_modules/#ionic/core/dist/ionic.js'></script>
It is throwing as above URL is not found even though I have installed #ionic/core. Can someone help me with this
i tried to include that script in angular index.html file but it not working
Thanks in advance
Regular
Pinterest
Related
I'm trying to migrate a Chart.js html file created using version 2.7.1
My first problem is how to replace first script found at begin of my HTML file
<script src='https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/0.5.7/chartjs-plugin-annotation.js"></script>
I have already replaced first script named Chart.min.js by following line
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
I'm surprise that version number has been removed from script name but it is what is rated on Chart.js web site.
Now I try to find Annotation plugin but I don't find any script reference on the Web.
Where can I find Annotation plugin on the web and use it without installing this file on my PC ?
If what I search is impossible, how can I do to continue to use Annotation plugin ?
Thanks for any help
You can put the lib name in the search bar of the cdn
https://cdnjs.com/libraries/chartjs-plugin-annotation
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/1.0.2/chartjs-plugin-annotation.js" integrity="sha512-sAqZojh+v9iWel74NtgLdr9y2QWsy+kfFfffU9Gzgcrg6SmNDLIznMTyZIFo33dDcRMhYV9HGCDbaTVXxUwz7g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
I'm trying to learn Vue.js as well so I create a simple folder called VueTest.
I have two files in the folder:
app.js
index.html
I found the info on how to configure the task runner to open up the current file and I have that setup to open in Chrome, which it does. However, because it's not running as a project, my index.html doesn't see the app.js file and so my Vue project is not working correctly. I just runs the HTML code an all I see is my mustache code (ex: {{Title}}).
How do I run files as a project?
If get it correct - you want to launch js app without opening teminals outside 'VS Code' then you have to see this
Have fun
I found my mistake, it's actually easy and I should have figured this out before posting.
To run Index.html on it's own, all I had to do was make a script reference in the page pointing to the app.js file. I didn't have to do that in JsFiddle.
you can't run files as a project in VS Code. it is just a text editor.
Im including the google cast external javascript library. When I run with ionic serve it works good, but when I run the app in the phone, the library is not loaded. Debugging can see that :
https://cdn-enterprise.discourse.org/ionicframework/uploads/default/original/3X/a/d/ad4c985f45c1c538bdfbfbb02d10141b6929e1d5.png
The "http" is replaced by "file"!
I tried to include the libraries with that code:
script src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1">
and with type="text/javascript" added; but all codes replaces http by file, and the library is not loaded.
Any suggestions?
When you run the app do not add cdn files starting with "//:", add them like "http://".
If its possible download those files and keep them in directory, after that give directory path to file.
e.g. <script type="text/javascript" src="assets/js/library.js">
I am using cordova 1.7.0. My app is running fine in simulator but a message comes like
Error: executing module function 'setInfo' in module 'cordova/plugin/ios/device'. Have you included the iOS version of the cordova-1.7.0.js file?
I have included
<script type="text/javascript" charset="utf8" src="[location of cordova.ios(for ios)]"></script>
in index.html but did not work.Plz help.
there must be something wrong with the path to the js.
The index.html file is read?
Is your www folder maybe a group instead of a reference folder?
Go step by step
This generally happens when the cordova file is not properly available when the page is loaded. You can check that it is referencing properly by opening the index.html (or your start page) in the Chrome and check in Inspect Element that all the resources are loaded and there are no errors.
to solve this problem, just follow steps in picture
How do I integrate a plugin with PhoneGap on Windows Phone 7?
I've found tutorials for iOS, Android and BlackBerry, but nothing about WP7.
I've put the .cs file in the Plugins folder, but I'm not sure it is enough.
To integrate a wp7 plugin with phonegap these are the general steps :
Include the plugin definition and js implementation javascrtip file in your html page head section
[script type="text/javascript" charset="utf-8" src="myPlugin.js"][/script]
in your code you need to call it like:
navigator.plugins.myPluginName.myPluginFunction(parameters);
you may need to make few additions in your html as per plugin required.
Also check for entry for myplugin in WMAppManifest.xml
I have used myPlugin as an reference so please replace the name with your actual plugin name.
Hope this help you
~K
The problem was in the .js file.
PhoneGap is now called Cordova, so the js files of old plugins have to be updated with the new class name.