Showing all posts tagged: 'JavaScript'

A 21-post collection

Speaking at FEConf 2017 - All about VS Code and JavaScript

This year I had the pleasure and privilege to be invited to speak at FEConf2017, a free, web-based conference devoted to Front End development and all things JavaScript. I took this opportunity to speak about one of the tools I love so much and one that I use daily for most of my coding - Visual Studio Code. My talk focused on how VS Code is a great (if not the best) text editor/IDE for working with JavaScript or TypeScript and I tried to showcase the excellent work that the core VS Code team and the community has done, …[read more]

TypeScript 2.0 RC with Visual Studio Code

You know how much I love new, shiny things? For some odd reason, I'm compelled to try the latest and 'greatest' as soon as I know it's available. This, oftentimes, has inadvertent side effects such as breaking my machine and causing me undue stress. I also choose to do these upgrades/updates close to upcoming talking engagements. In summary, I'm a gluten for self-inflicted punishment. On the other side, I suffer so you don't have to :) Today, I decide to test the latest version of TypeScript 2.0 RC which was released only 2 days ago. I also chose to …[read more]

Render PDFs on the browser using JavaScript

Most browsers these days support PDF rendering. In some cases, you may also need a PDF plugin to be installed. But what happens if you need to render PDFs on a closed system with no access to 3rd party plugins? How do you ensure that your solution can work consistently cross-browser? I recently worked on a project where we had to integrate a PDF viewer on a “closed” web application and this presented a new challenge. And who doesn’t love a good challenge? The requirements for the PDF viewer were as follows: Should work cross-browser Should support modern(ish) …[read more]

Finding out Angular.js Form validation errors the easy way

Today I was having an issue with one of my forms misbehaving (or so I thought) while validating errors. The Submit button is disabled by default if there are any vaidation errors. But where are these errors coming from? Then I asked help from a friend (thanks Jon MacInnes) who showed me a very clever code snippet for figuring out what validation is doing on my form. If you, like me, have similar issues, just inject the following piece of code in your form and debug away Make sure you change the form name and the position to fit your …[read more]

Get URL parameters using JavaScript

This one will be quick and easy. I'm currently working on an Angular.js/MVC application and I need to grab the URL parameters from the current page. Simple right? Well not so much. Firstly, I'm not using ngRoute and, secondly, I don't want to use any other external library/utility. Just plain, old, vanilla JavaScript. How did I do it then? Parsing URLs with JavaScript I've created a simple method to manage this. The method is pretty straightforward. It takes a URL, parses the parameters with a bit of RegEx 'magic' and then returns an object with our parameters. …[read more]