Last active
December 30, 2018 23:47
-
-
Save LayZeeDK/db6691bf81ea9026fef47639aad2d9de to your computer and use it in GitHub Desktop.
Pre-Angular 6 singleton service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HttpClientModule } from '@angular/common/http'; | |
import { NgModule } from '@angular/core'; | |
import { PreSixModule } from './pre-six.module.ts'; | |
@NgModule({ | |
imports: [ | |
HttpClientModule, | |
PreSixModule, | |
], | |
}) | |
export class CoreModule {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HttpClient } from '@angular/common/http'; | |
import { Injectable } from '@angular/core'; | |
@Injectable() | |
export class PreSixSingletonService { | |
constructor( | |
private http: HttpClient, | |
) {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { PreSixSingletonService } from './pre-six-singleton.service'; | |
@NgModule({ | |
providers: [ | |
PreSixSingletonService, | |
], | |
}) | |
export class PreSixModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment