Tag Archives: angular

Home / angular
76 Posts

Earlier today, I helped a colleague on a small issue. That issue was giving focus to an element in a modal once the modal is loaded.

This seems trivial, but it’s actually not entirely straight-forward due to Angular’s digest cycle.

As usual, I wanted to wrap this into a reusable directive.

More Link

In many of my latest applications, it’s necessary to have data drive what a form-element actually lets the user enter. For example, I may have a drop-down to select a property, and then, based on that property, a common text-box is used for its entry.

Sometimes its nice to have the data-type of the property drive a user-friendly experience.

More Link

After my brief primer (Part 1) of the things I’m looking to accomplish with Angular in what I consider a large-scale application, I’ve had a week or so to toss around ideas and get a solid foundation.

To recap, I want this application to avoid becoming an unruly, behemoth that is unmanageable. I want core, reusable components to be separated from core functionality. That is to say, I want loose coupling. The application should have hooks, navigation, and what not that is self-aware while allowing multiple developers to create their own discrete set of functional areas. In that vein, or to that end, I want “areas” to be independent for the most part and, as such, developers should be able to work on the individual functional areas without stepping all over each other’s code, or worrying much about breaking other parts of the application.

More Link

This week, my team and I have embarked on a new large scale application.  It’s predominately your typical web multi-tier web application with business logic, security, CRUD, and what not.

However, it’s also going to be an Angular Single Page App (SPA). Thinking about the structure of this application, in terms functional blocks and project/solution layout is pivotal in the design and engineering process.

More Link

angular_small
While working with an Angular application that involved selecting rows in a table with checkboxes, I found that the requirements necessitated having a ‘select all’ checkbox.

Selecting all elements is a common, and usually pretty easy, mechanism to incorporate. But, if you want an indeterminate, or tri, state, for your top-level checkbox selector, it becomes a little more involved.

More Link

When I’m online with my banking site, or Pandora, I occasionally get those nice dialogs asking if I’m still around after being idle for a while. Sometimes, I think it’s a nuisance, but it can be a helpful security measure. It can also be beneficial in SPA-type applications.

With SPA’s, the user can perform so many actions in the browser that never make requests of the server. As a result, if we’re using a cookie-based security mechanism that has a short expiration time, they could be effectively logged out and not even know it.

This is a problem.

More Link

A few weeks ago, I made this nice little side-bar that allowed a user to click an element and then perform actions on that element. They could also add new elements.

The idea of showing a quick animation for when a new element is animated using Angular’s animation framework sounded easy. However, it turned out to be problematic.

More Link

One of the best features of Angular is also one of its most impactful on performance. That feature is two-way binding.

To achieve two-way binding Angular “watches” for when JavaScript objects change and when the DOM values change during Angular’s digest cycle. It’s not an extremely complex mechanism, conceptually, but it’s very effective.

More Link

Previously in my discussion of how I like to use the ui-router and states for basic layout functionality, I touched on the basic tenants of what I see as prominent in many SPA applications. In this discussion, I’d like to dig a little deeper and illustrate a simplified implementation of a menu navigation system.

In developing a menu navigation system, I initially consider how flexible I need the navigation to be. If users can change states with hopeless abandon, then define your states and use ui-sref and nothing more. If we need more functionality, we need a more robust solution.

More Link