Static typing in html for angular in Visual Studio - html

Is there any way to check if html is valid and to have some intellisense? I mean I need something like typescript, but for html. For example I would like to get compilation errors when I use directives which are not exists. Or properties of scope what are not declared (in case of TS).
update:
I basically need kinda tsx for angular. And it's already addressed here https://github.com/Microsoft/TypeScript/issues/6508

I would strongly suggest you to use WebStorm which is a smart coding assistance for JavaScript and compiled-to-JavaScript languages, Node.js, HTML and CSS.
One of the best for Angular.
It has free 30-day trial and you can download it from the link below:
https://www.jetbrains.com/webstorm/

Related

Change csv output from one column to multiple in html

I have tried to find an answer but am not finding what I am looking for. I am using hostinger to host my website and using their built in design software. Their csv output creates a csv file with all parameters in one column instead of each parameter in its own column. I believe programming is in html and I don’t have access to base code but I can add to the “header” of the code with custom code. Does anyone know what will help me to solve my issue?
I haven’t tried anything yet as I’m not very familiar with html and Hostingers support team told me to look here as they specialize in hosting and support of that, not programming.
are you using their Website builder and a pre-designed templates ?
if you think the problem come from website template, you can delete that section and use custom html code
https://support.hostinger.com/en/articles/6475646-website-builder-how-to-customize-a-website-template#h_ed99b23b6a
There are two ways to add HTML code to your website, and it depends on the type of code you want to add.
If the code needs to be added to the part of your website's source code, use the Custom code field in your website's integration settings.
If the code needs to be added to the part of your website's source code, use the Embed code element.

Does intellisense for binding works in html with visual studio code for angular?

I typically use intelliJ (back-end/java) and the intellisense is working for html (basically am able to go to the definitions of the bound properties). And its doing OK with angular...
I tried to do the same with VS Code (as i am trying to evaluate is VS code gives anything more other than chrome-debugging in VS code), but somehow the intelliSense is not working.
I feel like its basic feature, probably I am missing something in my IDE.
Is it supposed to work?
Anything additional config/setup i need to make it work...
And yes, intellisense in ts files is working as expected...
Note:
Installing Angular Language Service extension did not do the trick for me. After installing and reloading (https://github.com/angular/vscode-ng-language-service) when i tried to go to definitions its just keeps spinning (loading). Not even sure what its doing in background as i don't see obvious options to see the details.
Regards.
John Papa the author of both AngularJS and Angular's style guide and Microsoft employee (makers of VSCode) has a blog where he talks about this very thing.
https://johnpapa.net/essential-angular-vs-code-extensions/
I would recommend any of his talks or blog articles!
Regardless, the plugin you're looking for is
Angular Language Service - This extension provides a rich editing experience for Angular templates, both inline and external templates. This extension is brought to you by members of the Angular team. It is fantastic at helping write solid code in the html templates.
https://marketplace.visualstudio.com/items?itemName=Angular.ng-template
and/or
Path Intellisense - Visual Studio Code plugin that autocompletes filenames. Hopefully, VS Code will bake this in at some point. Until then, this is a keeper.
https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense
Here are some extensions that may be useful to you.

HTML Layout/Templating

I am building a website where i'm looking to create html templates which contain placeholders where i'll be able to inject pages/content, menus, etc.... I really like AngularJS which has good support for this but am thinking that it might be a bit of an overkill for what i'm building. There is a chance some parts of the application will eventually be ripped out and run standalone and so dont want to tie the html/javascript to a library which requires so much framework specific syntax. Are there any other, simpler libraries, that will allow me to do this? thanks in advance
/Eric
KnockoutJS is pretty lightweight and also includes a templating feature.
I wouldn't just dismiss angularjs because it seems like a heavy framework. There are very simple ways to use it without using any of the "advanced" features like routing, creating services, creating directives, etc. You can simply have a controller and use the built in directives to do a lot of powerful things on a single page. Angular is also pretty small and is easily bootstrapped with the ng-app tag anywhere in your DOM.

Find Tags in website HTML's

I'm using Perl.
I have the tag, for example: "XYZ_PKM_HTML"
I would like to be able to provide a base url, for example: www.example.com
and the to get the HTML page (not necessarily the main page, thats easy) where this tag appears.
is it possible? any idea? (or already made modules, looked on cpan, there were some interesting stuff, but not installable)
Thanks,
MJD has an extended example on writing a web spider in Higher-Order Perl. It is section 4.7. See page 187 in Chapter 4.
Of course, you can also try the WWW::SimpleRobot module he mentions.
You seem to want to implement a web site crawler and a searcher. You usually do the former with WWW::Mechanize and the latter with HTML::Twig
Try Web-Scraper in Perl. Web-Scraper module info.
It is easy to work with and you can search for specific tags or elements and get the data from it.

Does Django have HTML helpers?

Does Django have any template tags to generate common HTML markup? For example, I know that I can get a url using
{% url mapper.views.foo %}
But that only gives me the URL and not the HTML code to create the link. Does Django have anything similar to Rails' link_to helper? I found django-helpers but since this is a common thing I thought Django would have something built-in.
No it doesn't.
James Bennett answered a similar question a while back, regarding Rails' built-in JavaScript helpers.
It's really unlikely that Django will ever have 'helper' functionality built-in. The reason, if I understand correctly, has to do with Django's core philosophy of keeping things loosely coupled. Having that kind of helper functionality built-in leads to coupling Django with a specific JavaScript library or (in your case) html document type.
EG. What happens if/when HTML 5 is finally implemented and Django is generating HTML 4 or XHTML markup?
Having said that, Django's template framework is really flexible, and it wouldn't be terribly difficult to write your own tags/filters that did what you wanted. I'm mostly a designer myself, and I've been able to put together a couple custom tags that worked like a charm.
The purpose of helpers is not, as others here imply, to help developers who don't know how to write HTML. The purpose is to encapsulate common functionality -- so you don't need to write the same thing a thousand times -- and to provide a single place to edit common HTML used throughout your app.
It's the same reason templates and SSI are useful -- not because people don't know how to write the HTML in their headers and footers, but sometimes you want to write it just once.
EG. What happens if/when HTML 5 is
finally implemented and Django is
generating HTML 4 or XHTML markup?
Same thing that happens when HTML 5 is implemented and all your templates are written in repetitive HTML, except a lot easier.
The other posts have already answered the question, linking to the docs on custom template tags; you can use tags and filters to build your own, but no, there aren't any built in.
it doesnt look like they're built in but here's a couple snippets. it looks like it'd be pretty easy to create these helpers:
http://www.djangosnippets.org/snippets/441/
Here is a list of all template tags and filters built into Django. Django core doesn't have as much HTML helpers as Rails, because Django contributors assumed that web developer knows HTML very well. As stated by saturdaypalace, it's very unlikely for AJAX helpers to be added to Django, because it would lead to coupling Django with a specific JavaScript library.
It's very easy to write your own template tags in Django (often you need just to define one function, similiar to Rails). You could reimplement most of Rails helpers in Django during a day or two.
I bet if there would be any consent of what is common html, there would be helpers module too, just for completeness (or because others have it). ;)
Other than that, Django template system is made mostly for HTML people, who already know how to write p, img and a tags and do not need any helpers for that. On the other side there are Python developers, who write code and do not care if the variable they put in context is enclosed by div or by span (perfect example of separation of concerns paradigm). If you need to have these two worlds to be joined, you have do to it by yourself (or look for other's code).
This won't answer directly to the question, but why not using foo in template then?