Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Angular Basics Angular Components Component Templates and Styles

The image and the figcaption text are not showing in the browser view???

// this is code from my entry.component.ts

import {Component} from '@angular/core';

@Component({
   selector:'app-entry',
   templateUrl:'entry.component.html',
   styleUrls: ['entry.component.css']


})

export class EntryComponent{
    title:string = 'My first photo';
    photo:string = 'http://placehold.it/800×500?text=Angular Basics';
    description:string='A description of my First job';


}

// this is my code from "entry.component.html"
 <h2>{{title}}</h2>
<figure>
   <img src="{{photo}}">
    <figcaption>{{description}}</figcaption>
</figure>

1 Answer

Are you getting any errors in your Browser console?