Articles for November 2017

Creating An Input-Driven AutoFocus Directive In Angular 5.0.2

HTML form elements already provide for an “autofocus” attribute that will pull focus to an input field after it is rendered on the page. This is great for static pages; but, in my experience, using the autofocus attribute in an Angular 5 application can be a bit hit-and-miss. It will often work the first time that an input is rendered; but, it will then stop working even if that input is hidden and re-rendered. As such, I usually end-up creating an autofocus attribute directive that wraps the focus workflow in a timer. Encapsulating the autofocus in an attribute directive has the added benefit of being able to (somewhat) programmatically control which input receives focus.
Source: Creating An Input-Driven AutoFocus Directive In Angular 5.0.2

Angular Material — Part 4: Data Table – Blog – Medium

This post has been published first on

This is the fourth part of the Angular Material series on In this part, we’ll be focusing on Data Tables. Of course, this part again assumes that you’re familiar with the Angular Material library in general and that you know how to setup an Angular project and install the Angular Material library in that project. If you’re new to Angular Material please first take a look at the first part of this series: Angular Material — Part 1 Introduction or visit the Angular Material Website at .

Source: Angular Material — Part 4: Data Table – Blog – Medium

Angular Elements and SPFx –

Angular is pretty good. But it likes to own the page, if not the whole website. It is hard to,

a) Have Angular co-exist with other stacks

b) Inject angular for one small quick job

c) Package an angular “widget” for use in wordpress, sharepoint, etc.

Interestingly, this is something AngularJS used to be able to do, but Angular has sort of lost this on its way. Technically all of the above is possible with Angular, but it’s complex. Very complex.

And this is exactly the gap that Angular Elements fulfills.

Source: Angular Elements and SPFx –