O'Reilly logo

TypeScript: Modern JavaScript Development by Ivo Gabe de Wolff, Vilic Vane, Remo H. Jansen

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

Adding a details view

The details view is shown when the user scans a code or clicks on an item in the recent scans list. It shows the content of the scan and the date, as shown in the following screenshot:

Adding a details view

If the content of the scan is a URL, we will show a button to open that link, as shown in the following screenshot:

Adding a details view

At the end of this chapter, we will style this page properly.

We add a function to src/model.ts that will return true when the scan (probably) contains a URL. We consider a scan that contains no spaces and begins with http:// or ...

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