O'Reilly logo

Practical Internet of Things with JavaScript by Arvind Ravulavaru

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up the web app

Now that we are done with the API engine, we are going to develop the interface needed to show the weather output from the Raspberry Pi 3.

Open web-app/src/app/device/device.component.html and update it, as shown here:

<div class="container"> <br> <div *ngIf="!device"> <h3 class="text-center">Loading!</h3> </div> <div class="row" *ngIf="lastRecord"> <div class="col-md-12"> <div class="panel panel-info"> <div class="panel-heading"> <h3 class="panel-title"> {{device.name}} </h3> <span class="pull-right btn-click"> <i class="fa fa-chevron-circle-up"></i> </span> </div> <div class="clearfix"></div> <div class="table-responsive"> <table class="table table-striped"> <tr *ngIf="lastRecord"> <td>Temperature</td> <td>{{lastRecord.data.t}}</td> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required