Skip to content

Instantly share code, notes, and snippets.

@wKoza
Last active December 25, 2016 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wKoza/8e9a889965f854c51c72d4c8abcc89ef to your computer and use it in GitHub Desktop.
Save wKoza/8e9a889965f854c51c72d4c8abcc89ef to your computer and use it in GitHub Desktop.
import { Component, OnInit } from '@angular/core';
import { LoggerService } from "./logger.service";
@Component({
selector: 'app-component1',
template: '<app-component2></app-component2>',
providers: [LoggerService]
})
export class Component1 implements OnInit {
constructor(private logger:LoggerService) { }
ngOnInit() {
this.logger.error('component1'); //cela fonctionne
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment