This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +0
-103
lines changed
public/docs/_examples/heroes-graphql/ts/app Expand file tree Collapse file tree 4 files changed +0
-103
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import { AppComponent } from './app.component';
26
26
import { DashboardComponent } from './dashboard.component' ;
27
27
import { HeroesComponent } from './heroes.component' ;
28
28
import { HeroDetailComponent } from './hero-detail.component' ;
29
- import { HeroService } from './hero.service' ;
30
29
// #enddocregion v1, v2
31
30
import { HeroSearchComponent } from './hero-search.component' ;
32
31
// #docregion v1, v2
@@ -56,7 +55,6 @@ import { HeroSearchComponent } from './hero-search.component';
56
55
// #docregion v1, v2
57
56
] ,
58
57
// #enddocregion search
59
- providers : [ HeroService ] ,
60
58
bootstrap : [ AppComponent ]
61
59
} )
62
60
export class AppModule { }
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import {Subject} from 'rxjs/Subject';
10
10
import gql from 'graphql-tag' ;
11
11
12
12
import { Hero } from './hero' ;
13
- import { HeroService } from './hero.service' ;
14
13
15
14
@Component ( {
16
15
moduleId : module . id ,
@@ -27,17 +26,12 @@ export class HeroDetailComponent implements OnInit {
27
26
private heroObservable : ApolloQueryObservable < any > ;
28
27
29
28
constructor (
30
- private heroService : HeroService ,
31
29
private route : ActivatedRoute ,
32
30
private location : Location ,
33
31
private apollo : Angular2Apollo
34
32
) { }
35
33
36
34
ngOnInit ( ) : void {
37
- // this.route.params
38
- // .switchMap((params: Params) => this.heroService.getHero(+params['id']))
39
- // .subscribe(hero => this.hero = hero);
40
-
41
35
this . route . params . subscribe ( params => {
42
36
const heroId = params [ 'id' ] ;
43
37
@@ -64,8 +58,6 @@ export class HeroDetailComponent implements OnInit {
64
58
65
59
// #docregion save
66
60
save ( ) : void {
67
- this . heroService . update ( this . hero )
68
- . then ( ( ) => this . goBack ( ) ) ;
69
61
}
70
62
// #enddocregion save
71
63
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import {Subject} from 'rxjs/Subject';
10
10
import gql from 'graphql-tag' ;
11
11
12
12
import { Hero } from './hero' ;
13
- import { HeroService } from './hero.service' ;
14
13
import { ApolloQueryResult } from 'apollo-client' ;
15
14
16
15
@Component ( {
@@ -28,17 +27,12 @@ export class HeroDetailComponent implements OnInit {
28
27
private heroObservable : ApolloQueryObservable < any > ;
29
28
30
29
constructor (
31
- private heroService : HeroService ,
32
30
private route : ActivatedRoute ,
33
31
private location : Location ,
34
32
private apollo : Angular2Apollo
35
33
) { }
36
34
37
35
ngOnInit ( ) : void {
38
- // this.route.params
39
- // .switchMap((params: Params) => this.heroService.getHero(+params['id']))
40
- // .subscribe(hero => this.hero = hero);
41
-
42
36
this . route . params . subscribe ( params => {
43
37
const heroId = params [ 'id' ] ;
44
38
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments