After we finish the TopStoriesComponent to list top stories, we are going to allow users to view the actual web pages of stories. In this chapter, we’ll use Cordova InAppBrowser plugin to view web pages.
A Simple Solution
The basic solution is quite simple. We just need to use the standard HTML
<a> elements
in the item’s template. As in Listing
7-1, we added the
<a> element with the attribute
href set to
item.url. The old
div element that contains the URL is removed.
<h2 class="title">
<a [href]="item.url">{{ item.title }}</a>
</h2>
Listing 7-1Use <a> for a story’s URL
When we run ...