For the past few months, I’ve been playing around with the new Web Bluetooth API which is about to ship in Chrome 56 in February 2017. And let me tell you, this new feature just unlocked lots of new possibilities for the Web.

As a Web Advocate, I was so excited and couldn’t wait to build an application showing how easy it is to combine Angular and the Web Bluetooth API (even more, with any of the upcoming Web APIs, more on that soon, stay tuned).

Let’s meet The Missing Web Bluetooth Module for Angular Application

I started then working with my buddy François Beaufort (kudos to him!) to build a demo app, a kind of proof of concept that illustrates how to integrate Web Bluetooth with Angular.

After implementing a couple of use cases, I came up with an Angular module which abstracts away all the boilerplate needed to configure the Web Bluetooth API.

A Few Disclaimers

Web Bluetooth APIs

I am going to assume that you’re already familiar with the Web Bluetooth APIs: GATT server, Services, Characteristics…etc. Please make yourself comfortable with this topic before reading the next sections. Here are few resources:

Observables

I am also assuming that you have some basic knowledge about Observables, Observers and Subjects.

Finnish Notation

You will notice that some methods ends with a $ symbol. This is some sort of convention in the Observables world that we’ve been using for a while. We may drop this $ symbol in the future because of this blog post.