I am new at web development and working on one project where i have to use bower tool for front end development.I have created a project in intellij and installed bower and grunt on local project with angular js and jquery.i have created a file called index.html and its working fine when i write HTML but now i want to code in angular js. So i have added the script tag which is shown below in html file but it doesnt work. I know its a basic thing but i am not able to get it. I tried many things. Thank you in advance.
Ok just to make sure.
first
Check into the bower_components directory if the Angular folder is there.
If angular folder is there, like on the image.
if the file its not there run bower install angular or sudo bower install angular
second
You could manually add the Angular Sortable
script files yourself but Yeoman will automate this for you!
now run grunt serve just to check if angular script tag is there.
you should get this on console.
<script src="bower_components/angular/angular.js"></script>
Third
If this is ok, you could start getting into this tutorials to start using Angular.
W3 School Angular tutorial
thinkster.io Tutorial
From angular docs
include the Angular Javascript file via script tag.
http://fdietz.github.io/recipes-with-angular-js/introduction/including-the-angular-library-code-in-an-html-page.html
check this link for detail
Related
I currently have a project that is using ClojureScript, shadow-cljs, re-frame, and CKEditor.
I am trying to figure out how to write a custom plugin for CKEditor usoing CLJS instead of JS.
CKEditor uses the following to load external custom plugins
// Loads a plugin from '/myplugins/sample/my_plugin.js'.
CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/', 'my_plugin.js' );
Is there a way to write my_plugin.js in CLJS in my current project?
I think your question is: I have a CLJS project that uses shadow-cljs and happens to use CKEditor as a library. I also want to create a plugin for CKEditor within the same project.
If that's the case, I think what you need is just create a new build for the plugin code in the :builds section of your shadow-cljs.edn file and configure it properly (eg. source files, etc.). See the Build Configuration section of the shadow-cljs User's Guide for details.
Once you build your plugin, it will put the output JS file in some location. Probably you need to copy this plugin JS file to a location in the "parent" project before building the main project.
I'm having problems running the polymer build command of the polymer CLI, it gives me the following feedback:
and neither of my built folders (bundled or unbundled) have the javascript files. The build process places <script> tag with the src of a javascript file in the place of my javascript code, but this files are not being generated.
I don't know if both errors are related, but I don't know what can I do to generate the <component>.html_script_0.js files.
I had this same problem and saw that there were several issues reporting it.
It seems a fix has been already merged and is part of v0.9.0 but I'm not completely sure if the fix is up on npm just yet.
I'm building my angularjs application to Phonegap Android application. I have builded the project using Yeoman/Grunt and I get it to work on webserver after that, but When build with Cordova/Phonegap to Android .apk file and installed on device I get only this to console:
GET file:///android_asset/www/app/_main/main.tpl.html net::ERR_FILE_NOT_FOUND
When I debug the application with Chrome android debugging and look the source it sohws index.html as empty (but it can be can it? Since it has to load the angularjs to try to get to the main template, and that happens in the index.html) and I can't find any of the other .html files from there.
\platforms\android\assets\www
In cordovas android project folder everything seems to be just as it's upposed to be.
Figured it out by myself. It was due to the folder name.
"_main"
So the '_' -character broke it. :)
I am using google web components from the following page but it seems that it has a lot of error. A lot of file is not found. Note: I am using google sign in and google analytics.
Google Web Components
How to resolve the issue without downloading and replace the the missing file path one by one?
You approach is completely wrong.
TL;DR One can not simply refer the url for the file and hope that relative paths in it are resolved automagically. The workflow is a way more complicated.
You should create an application (the easiest way is to use Yeoman’s generator for that). Than you should explicitly specify, which components you want to use with bower:
bower install google-calendar --save
... etc
That would install the components locally (--save is to update your bower.json).
Then you probably would vulcanize everything (thanks yeoman generator, grunt script comes with all the tasks prepared.) Your project is now ready to deploy.
Hope it helps.
You should be able to install the missing dependency components the same way you got your Google Web Component. Whether that is via download or bower or whatever, just make sure the relative paths line up. Even if you create a build task or generator you will still need the components dependencies correctly referenced.
I'm new to prime-ui (PrimeUI is a spin-off project from the popular JSF Component Suite, PrimeFaces). I have downloaded prime-ui-0.8.bundle.zip file from http://www.primefaces.org/downloads.html . I want to configure it with my simple web application having html pages. I don't know which css and js files do I need to include so that it will start working.
Please help.
Thanks
You need to files two be located in your page. prime-ui-0.8.min.css and prime-ui-0.8.min.js. These two files are in production folder of the zip file you downloaded. You also need jquery.js and jquery-ui.js in addition to the themeroller theme.