If you’ve been in web development long enough, you’ve probably had to create a PDF of some sort. For years the go to standard for generating PDFs in code has been iText from by Bruno Lowagie. If you have to do serious work with embedded fonts, complex layouts, drawing etc. it beats everything hands down.
This morning I started to look at putting some charts on an Angular 2 site. I was expecting to use HighCharts and do something similar to how I integrated with tinymce. I always run a quick search before building something new to see if there’s any libraries/snippets/info on the web that might be useful or teach me a better way to look at the problem.
To my delight, valor software has put together a nice integration with chartjs called ng2-charts.
Continue reading Angular 2 Charts
A common scenario is needing to nest tabular data on a website. Maybe you’re grouping sales data by country/state or wanting to expand a table row to see someone’s contact details.
The results might look something like this:
Continue reading Angular 2 Nested Grids
This should reduce the amount of http requests and hopefully load time as well. To load the homepage, my site is making 404 http requests, transferring 2.2Mb of data, and takes 5.31s to load. I’d like to bring the initial page load time down to 1s or less if possible.
Continue reading Angular 2 Inline Templates
Browser caching of files yields major performance benefits, reduced network usage, decreased load times etc.
Today we’re going to look at a simple way to achieve versioning in an angular 2 app using a query string parameter.
Continue reading Angular 2 SystemJS Cache Busting
I’ve been working on an Angular 2 app recently and needed the ability to hide/show content based on a user’s roles in the system.
I will walk through an example of how to build an angular 2 directive which takes in an array of roles, and calls a data service to match against what roles a user has. The directive will not render the components/html a user doesn’t have the right roles to access.
Continue reading Angular 2 User Permissions
Say you have some vimeo videos setup in bootstrap modal dialogs.
Consider the following scenario:
- User opens modal and starts playing video
- User closes the modal. This could be an accidental click or they just don’t want to watch the video anymore
- Video keeps playing in the background
A video which continues to play in the background will be annoying if it contains audio and you have your speakers/headphones on.
Thankfully, bootstrap and vimeo have provided all the tools necessary to stop playing a video when the modal closes.
Continue reading Stopping Vimeo Video On Modal Close
Twitter bootstrap is a great css framework, but their out of the box mobile navbar experience can be a bit lacking.
On iPhones the collapsed menu doesn’t expand, and iPads the full size menu dropdowns don’t display.
Continue reading Bootstrap Mobile Menu