title: How to print object properties in template in Angular2
body: <p>I am new to angular2, And trying to bind object result to the html template. I am able to get data from srtvice by using Observable. I am able to see JSON data in console and in template as well. But when I try to access property from result json, It's not showing data as below image.</p>
  
  <p><a href="https://i.stack.imgur.com/Qg7Qa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qg7Qa.png" alt="Output"></a></p>
  
  <p>Below is my code of that componenet,</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { ActivatedRoute } from '@angular/router';
  
  import { JuniorService } from '../Service/service.junior';
  import { Employee } from '../../models/Employee';
  
  
  @Component({
    selector: 'my-getjunior',
    template: `&lt;h1&gt;Details of {{id}} 
    &lt;hr/&gt;
    JSON :  {{Junior | json}} 
    &lt;hr/&gt;
    Summary :  {{junior?.summary}}&lt;/h1&gt;`
    //templateUrl: './app/Junior/get/junior.get.html'
  })
  export class JuniorGet implements OnInit
   {
  
  errorMessage: string;
  Junior: Employee;
  id: number;
  private sub: any;
  
    constructor (private juniorService: JuniorService, private route: ActivatedRoute) {
  
   }
  
    ngOnInit(){
        this.sub = this.route.params.subscribe(params =&gt; {
         this.id = +params['id']; // (+) converts string 'id' to a number
       this.getJunior(this.id);
      });
    }
  
      getJunior(id) {
        this.juniorService.getById(id)
                        .subscribe(
                          data =&gt; {
                              this.Junior = data;
                              console.log("Junior data", this.Junior);
                            },
                          error =&gt;  this.errorMessage = &lt;any&gt;error);
    }
  
  
  }
  </code></pre>
  
  <p>I am calling service on imit method and that data I want to see in template.</p>
  
  <p>Where else do I need to change to print data?</p>