//app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule} from '@angular/http';
import { studentListComponent } from './student.List';
import { AppComponent } from './app.component';
@NgModule({
imports: [ BrowserModule,HttpModule ],
declarations: [ AppComponent,studentListComponent],
bootstrap: [ AppComponent ]
})
export class AppModule { }
//app.component.ts
import { Component } from '@angular/core';
import { studentService } from './student.Service';
@Component({
selector: 'my-app',
template: '<student></student>',
providers:[studentService]
})
export class AppComponent {
}
//student.Service.ts
import {Injectable, Inject} from '@angular/core';
import {Http, Response} from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
@Injectable();
export class studentService{
private _url:string = "http://localhost:3000/app/test.json";
constructor(@Inject(Http) private _http: Http){}
getStudent(){
return this._http.get(this._url)
.map((res: Response) => res.json());
}
}
//student.List.ts
import { Component, OnInit } from '@angular/core';
import { studentService } from './student.Service';
@Component({
selector:"student",
template:`
<h1>First Student List View</h1>
<ul *ngFor="let students of student">
<li>{{students.name}} Age {{students.age}} </li>
</ul>
`
})
export class studentListComponent implements OnInit {
student = [];
constructor(private _student:studentService){}
ngOnInit(){
this._student.getStudent()
.subscribe(studentData => this.student = studentData)
}
}import { Component, OnInit } from '@angular/core';
import { studentService } from './student.Service';
@Component({
selector:"student",
template:`
<h1>First Student List View</h1>
<ul *ngFor="let students of student">
<li>{{students.name}} Age {{students.age}} </li>
</ul>
`
})
export class studentListComponent implements OnInit {
student = [];
constructor(private _student:studentService){}
ngOnInit(){
this._student.getStudent()
.subscribe(studentData => this.student = studentData)
}
}
//test.json
[
{"id": 1, "name": "Sam", "gender": "Male", "age": 5},
{"id": 2, "name": "Tod", "gender": "Male", "age": 7},
{"id": 3, "name": "Samanta", "gender": "Female", "age": 7},
{"id": 3, "name": "Juli", "gender": "Female", "age": 8},
{"id": 4, "name": "Mark", "gender": "Male", "age": 9}
]
taldelle b9c45beda1 https://coub.com/stories/2632540-free-wood-hatch-patterns-for-autocad-daejaim
harmlit 79a0ff67a5 https://coub.com/stories/2730168-extra-quality-super-smash-bros-documentary-download
brilyn 79a0ff67a5 https://coub.com/stories/2778055-top-does-verizon-offer-wifi-calling
rekiwre ba0249fdb3 https://wakelet.com/wake/BP9pQVYlUwQvcZ3-DeCRc
chesoph 7383628160 https://www.cloudschool.org/activities/ahFzfmNsb3Vkc2Nob29sLWFwcHI5CxIEVXNlchiAgMCA0quFCQwLEgZDb3Vyc2UYgIDAwI6kuwsMCxIIQWN0aXZpdHkYgIDAwNOL6gkMogEQNTcyODg4NTg4Mjc0ODkyOA
livaden 7383628160 https://trello.com/c/CI2b8v53/45-solid-state-devices-and-technology-by-v-suresh-babu-pdf-free-better-download
savvit fe98829e30 https://www.cloudschool.org/activities/ahFzfmNsb3Vkc2Nob29sLWFwcHI5CxIEVXNlchiAgICfpKz-CAwLEgZDb3Vyc2UYgICA_5PViwoMCxIIQWN0aXZpdHkYgIDAkOvP0QgMogEQNTcyODg4NTg4Mjc0ODkyOA
chacher fe98829e30 https://trello.com/c/aD2blj3z/22-splinter-cell-blacklist-multiplayer-lan-crack-penquo
kaydar fe98829e30 https://wakelet.com/wake/RJE3RFlA9tCleAHMTiRXq
neilile fe98829e30 https://coub.com/stories/2959843-free-vaada-raha-i-promise-hd-movies-download-720p
clemlaun fe98829e30 https://trello.com/c/LZQEn2hX/33-link-coovadia-paediatrics-and-child-health-free-pdf-download
vladdaph fe98829e30 https://wakelet.com/wake/hiuhyASJNOx2C1Qu_rg60
kalcla fe98829e30 https://trello.com/c/hdy6CBuB/17-descargartorrentvirtualmatprofullgratis-full
ambrcate fe98829e30 https://www.cloudschool.org/activities/ahFzfmNsb3Vkc2Nob29sLWFwcHI5CxIEVXNlchiAgID_xs2uCwwLEgZDb3Vyc2UYgICA_5OV5gkMCxIIQWN0aXZpdHkYgIDAoImQ_QoMogEQNTcyODg4NTg4Mjc0ODkyOA
valyos d868ddde6e https://coub.com/stories/3003259-seadogstoeachhisownheroofthenationdownloadcrackedpc-landak
gemmder d868ddde6e https://coub.com/stories/3011565-descargar-vectorworks-2012-en-ingles-en-taringa-fixed
yeshbeve d868ddde6e https://coub.com/stories/2939219-pengantar-linguistik-bahasa-jepang-pdf-free-free
percsha d868ddde6e https://coub.com/stories/2963274-pes-2010-skidrow-password-rar-2083-makaran
tamagarl d868ddde6e https://coub.com/stories/2952204-descargar-project-x-love-potion-disaster-wii-evelgar
halally d868ddde6e https://coub.com/stories/2972937-dead-island-riptide-lan-crack-fix-choihamm
granale d868ddde6e https://coub.com/stories/3005314-link-nothingbutthievesbrokenmachinedeluxe2017320kbpsdownloadpc
braale d868ddde6e https://coub.com/stories/3095233-work-top2005-universal-programmer-usb-driver-for-windows-7-zip
quasferg d868ddde6e https://coub.com/stories/3013665-best-ccleaner-pro-5-63-7540-crack-license-key-2020-lifetime
derhil d868ddde6e https://coub.com/stories/3058885-song-of-the-trees-book-pdf-patched
alecneo d868ddde6e https://coub.com/stories/2933460-albertsintroduccionalabiologiacelular-naecarv
jaekaem d868ddde6e https://coub.com/stories/3036142-solucionario-de-ecuaciones-diferenciales-dennis-zill-9-edicion-checked
brymelt d868ddde6e https://coub.com/stories/2998464-officerecovery-2010-suites-full-crack-internet-jaenort
chagil b7f02f1a74 https://amosciesielski182w.wixsite.com/nsamcendsmarun/post/verilook-sdk-download-crack-17
dusthans b7f02f1a74 https://ratabbucudis.wixsite.com/funcdowlipe/post/betternet-vpn-for-windows-premium-v4-1-0-seupirate-crack
harfea b7f02f1a74 https://breakilposyser.wixsite.com/tiobrinormu/post/enigma-protec-download-latest-full-version-x32
rafabur f4bc01c98b https://coub.com/stories/3397918-hot-windows-10-enterprise-n-ltsc-2019-esd-en-us-nov-2018-gen2-serial-key-keygen
ligfri f4bc01c98b https://coub.com/stories/3471818-narasimha-ashtakam-in-tamil-pdf-download-upd
raenraib f4bc01c98b https://coub.com/stories/3401702-exclusive-intelsoft-deviz-full-version-download
dilder f4bc01c98b https://coub.com/stories/3459995-ccdc-gold-suite-51-free-downloadrar-fix
enchgre f4bc01c98b https://coub.com/stories/3264867-hdev-spencer-a-rathus-shauna-longmuir-pdf-cherjayr
gardlau f4bc01c98b https://coub.com/stories/3382755-descargar-gratis-win8activate
chrcar f4bc01c98b https://coub.com/stories/3507453-rogue-trader-planet-generator-high-quality