unisoftapps / ng2-log-service

Angular 2 Logging Service
MIT License
3 stars 5 forks source link

Use InjectionToken instead of OpaqueToken #6

Open vijjj opened 6 years ago

vijjj commented 6 years ago

Thanks for publishing this library. Very simple and easy to use.

Angular 4 introduced InjectionToken and deprecated OpaqueToken. Now with Angular 5, OpaqueToken is removed.

Could it be possible to update the library for angular ^4.0.0 by making the above change?

The change is required only in LogObserverService.ts. Something like the following.

import { Injectable, Inject, InjectionToken } from '@angular/core';

export let LOG_LISTENER = new InjectionToken<ILogListener[]>('LogListener');
davidkarlsen commented 6 years ago

I am also looking for a solution which is angular 5 compatible - will this move forward and is this project still active?

unisoftapps commented 6 years ago

I will be updating to support angular 5 this week.

Igor-G commented 6 years ago

Will this issue be resolved soon? It's just what we need in our project, but we cannot use it because we already use Angular 5.

unisoftapps commented 6 years ago

@Igor-G The Angular 5x version is here: https://github.com/unisoftapps/ng-log-service