<commit_before>import { Component } from '@angular/core';
import { IProduct } from '../../../app/common-interfaces/products';
import { ProductService } from '../../../app/services/products.service';

import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';

@Component({
  selector: 'my-app',
  template: `<h1>Hello {{name}}</h1>
            <ul>
                <li><a [routerLink] = "['/Product']">Product</a></li>
                <li><a [routerLink] = "['/Inventory']">Inventory</a></li>
            </ul>
            <router-outlet></router-outlet><h3>Best Luck</h3>`,
  providers : [ProductService]    
})

export class AppComponent  { 
    debugger;
    name = 'World - Kiran'; 
    iproduct : IProduct[];

    constructor(private _product : ProductService){}
    
    ngOnInit() : void {
        this._product.getproducts()
        .subscribe(iproducts => this.iproduct = iproducts);
    }
}<commit_msg>added the some extra code<commit_after>import { Component } from '@angular/core';
import { Router }  from '@angular/router'; 

import { IProduct } from '../../../app/common-interfaces/products';
import { ProductService } from '../../../app/services/products.service';

import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';

@Component({
  selector: 'my-app',
  template: `<div class="container">
  <div class="jumbotron">
    <h1>Angular 4 </h1> 
    <p>Angular is the most popular HTML, CSS, and JS framework for developing dynamic application.</p> 
  </div>
  <p>This is some text.</p> 
  <p>This is another text.</p> 
</div><a class="button" (click)="onBack()">back to product</a>
            <ul>
                <li><a [routerLink] = "['/Product']">Product</a></li>
                <li><a [routerLink] = "['/Inventory']">Inventory</a></li>
            </ul>
            <router-outlet></router-outlet><h3>Best Luck</h3>`,
  providers : [ProductService]    
})

export class AppComponent  { 
    iproduct : IProduct[];

    constructor(private _product : ProductService, private _router : Router){}
    
    ngOnInit() : void {
        this._product.getproducts()
        .subscribe(iproducts => this.iproduct = iproducts);
    }
   
   onBack() : void{
       this._router.navigate(['/Product']);
   }    
}
{'fraction_non_alphanumeric': 0.18070249682606856, 'fraction_numerical': 0.003808717731696995, 'mean_word_length': 2.8376623376623376, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1079445', 'n_tokens_mistral': 757, 'n_tokens_neox': 741, 'n_words': 161}