Tag: javascript

Deferring JS Until Script Load

A common recommendation when using JavaScript is to put your <script> elements at the end of your HTML, including those that reference a JS file on your site. One issue, however, is that if you then have a script that references a function from another script, how do you ensure the other script is loaded already?

Continue reading...

A Better $state.reload for the AngularJS UI-Router

While working on Apigility, several times I ran into an odd issue: after fetching new data via an API and assigning it to a scoped variable, content would flash into existence… and then disappear. Nothing would cause it to display again other than a browser reload of the page.

Continue reading...

A Bower Primer

Recently, I've been doing a fair bit of frontend development with my team as we've worked on the Apigility admin. This has meant working with a variety of both JavaScript and CSS libraries, often trying something out only to toss it out again later. Working with frontend libraries has been quite a hassle, due to a combination of discovery, installation issues, and build issues (minimization, primarily). I figured there must a better way.

Continue reading...