I'm using tidy-html5 from brew, and i can't tidy up my angular templates because they use custom elements like those :
<due-diligence-point index="1" title="Lead Screening">
This throws this error on tidy-html5 :
line 26 column 9 - Error: <due-diligence-point> is not recognized!
There is an option i'm skipping or this will just not work with tidy ?
The only option i have is to populate manually "new-empty-tags" ?
Little late to the party of one here but have you tried prefixing your element with the 'data-' tag? The following succeeds an HTML5 validator.
<!DOCTYPE html>
<html>
<head><title>asdf</title></head>
<data-custom-tag></data-custom-tag>
</html>
If you remove the data prefix however it will throw an error as an unrecognized element.
I've asked this before prettier existed, which completelly solves this kind of problem.
Related
I can't seem to get the thumbnails I have placed on this page to open in the lightbox:
http://prussellartist.com/custom-leather-dog-collar-gallery2.htm
I tried changing the order and placement of these 2 elements:
<link rel="stylesheet" href="dist/css/lightbox.css">
<script src="dist/js/lightbox.js"></script>
At a glance is there anything wrong?
Please take a look at the JavaScript errors ... It seems like you forgot the fourth step of the getting-started guide (http://lokeshdhakar.com/projects/lightbox2/#getting-started) - namely - to include jQuery.
I'm following an online tutorial, and it says all I need is angularJs script, and a ng-app tag.
Following this: https://www.youtube.com/watch?v=RBhqLRoRDgo
So I tried it, but ... it seems the most basic part, I'm failing at:
http://plnkr.co/edit/aX8C3MTPh2fu3klt54Qk?p=preview
{{ 843 / 42 }}
That should show the answer, as opposed to showing a string.
What am I doing wrong?
You have coded in angular 1 version but you have added angular 2 scripts. In simplest case you can add prior version or write in 2 fashion.
https://angular.io/guide/quickstart
In your plunker code, it seems you are using angular 2 that needs more preparations, (see angular 2 quickstart).
replace the script tag with this one:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
First of all, the URL given in the script src is a 404. Also, you're using angular 1.x syntax in your code.
For coding in angular 2.x, you should have a look at this quick start: https://angular.io/guide/quickstart
I have created a jsp page having a spring form. I want to validate the form using angular js. When I try to add required and ng-model attributes inside <form:input> tag, I'm getting exception Jasper exception equal symbol expected and Attribute ng-model invalid for tag input according to TLD in the line where i added these attributes.
What is the procedure to make my logic work?
There are 4 things you can try:
First one: Probably the neatest, and I think this should work:
<form:input path="usrname" maxlength="12" required="required"/>
So required='required' instead of just required
Second one: Forget about Angular Validation, and use Spring Validation methods. Maybe this isn't the thing you're searching for.
Third one: Isn't it possible for you to forget about <form:input> tags, and use <input> tags instead? Maybe not.
Fourth one: You can try to give your form:input tag an id, and at the bottom of your page, run a simple jQuery script. I know, this isn't the neatest thing to do, but maybe it works.
<html>
<body>
<form:input path="someinput" id="someinput"/>
</body>
<script>
$("#someinput").attr('required', '');
</script>
</html>
Please mark this as an answer if this helped you.
I'm new to MVCs and Angular and I tried to get angular-google-maps going by following the steps in the AGM QuickStart page. Firebug shows several errors, some of which I don't understand.
First, I get a 403 in accessing underscore. The message (minus localhost) is:
"NetworkError: 403 Forbidden - angular-oPast/app/..../node_modules/underscore/underscore-min.js" Why can't I access code that's in my own PC?
Second, I get SyntaxError: missing } after property list }; with some reference to ngLocale, which is not in my code.
Third, I get ReferenceError: _ is not defined with some reference to MarkerLabel, which I am not using.
Fourth, I get [$injector:nomod] Module 'residenceApp' is not available! This is the name of the overall Angular app. Despite having done a couple tutorials, I don't know how to build this for using AGM or where to put it.
Fifth, per the AGM QuickStart, I have the following in my CSS
.angular-google-map-container {height:400px;}
This is a puzzle because the instructions say nothing about creating an HTML class=".angular-google-map-container" I did not put an HTML class attribute in like that because there were no instructions to do that. What is that CSS doing, and is it correct for my situation?
My HTML using ng looks like:
<html lang="en" data-ng-app="residenceApp">
<div id="gMapCanvas" data-ng-controller="GMapController2">
<google-map center="map.center" zoom="map.zoom"></google-map>
</div>
Most of the rest of the HTML is mock up text, at this point.
My scripts look like:
<script src="..../node_modules/underscore/underscore-min.js"></script>
<script src="common/gmapGenerator2.js"></script>
<script src="common/mapGenerator/dist/angular-google-maps.min.js"></script>
Maybe I should say that example.html for AGM works in my PC. So I have the necessary code in the system. It just doesn't have dependencies set right, or something.
What do I need to do to fix these problems and get Google Maps working? I can provide more info, if necessary.
I want to make a simple use of the plugin x-editable, following step by step what's to do in the official doc.
It actualy worked fine when I was on Bootstrap 2, though, it doesn't work anymore on BS3 (even if I updated everything to the latest version etc.).
So when I click on the link to trigger the editable popover, I got this error in firebug :
TypeError: this.$element.data(...) is undefined
[...]/Bootstrap3/js/bootstrap-editable.js
Line 154
Which is actually this line :
this.$element.data('popover').tip().addClass('editable-popover');
Btw, I'm using CakePHP, all the plugins (js and CSS) are declared etc...
So I'm running out of idea, if someone knows about it, would be cool !
Thanks !
EDIT : Problem solved, just had to reload the cache... Old script was still in it so there was compatibility problems.
Did you download the latest Bootstrap 3 ready version from: http://vitalets.github.io/x-editable/assets/zip/bootstrap3-editable-1.5.0.zip
I didn't find any problem following the steps from http://vitalets.github.io/x-editable/docs.html. See: http://jsfiddle.net/xaRbU/
Note the examples use jquery-2.0.3 (the fiddle above works with 1.9.1). Since jQuery 2 doesn't support IE8 Bootstrap requires the newest 1.x version of jQuery, see also: Updating Bootstrap to version 3 - what do I have to do?
Code used:
html:
<div class="container">
<div class="row">
superuser
</div>
</div>
javascript:
$(document).ready(function() {
$('#username').editable();
});
css:
/* create some space cause the popup shows on the top of the element */
body{padding-top:100px;}