Archive for October, 2015

AngularJS Scroll to Top for New Pages on Single-Page-App

20 Oct

As promised in my last post, I’m going to try to keep updating with things I learn on my trek down the long road to Angular-ville. As far as I could tell, there isn’t much info about the issue I was facing online, so either I’m doing something wrong (and if I am, for heaven’s sake, don’t just sit there; please tell me!) or there aren’t as many people concerned with what I felt was a noticeable UX flaw in single page apps (SPA). To try to make clear my explanation of the issue, I’ll just walk through some steps that an end-user might experience with an SPA and how the page responds by default:

  1. User loads the home page. Angular fetches the template and inserts it into the ng-view.
  2. User scrolls down the page a bit, say 600px.
  3. User clicks a link to another page. Angular fetches the requested page’s template and inserts it into the ng-view, but the browser stays scrolled 600px, so the user doesn’t actually see the content they loaded.
  4. User clicks the browser’s back button and sees again the content they were at before clicking the link.

Read the rest of this entry »


AngularJS Auto-Focus Input After Router Template is Loaded in SPA

14 Oct

It’s been just a little while (oh, only about 3.5 years) since I last published any new posts here. Too busy.

At the moment I’ve been delving head-first into some modern frameworks like¬†AngularJS and Bootstrap, so I plan to document things I learn along the way that I think will help other developers also new to these technologies who might come up against some of the same issues or who might just find interesting the things I’m discovering.

Without further ado, this is my first of such posts, which is a little more advanced than just starting to learn everything from scratch, but I do plan to back-track and cover more in future posts the basics of using AngularJS.

Read the rest of this entry »