This file contains 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
Show hidden characters
{ | |
... | |
"rules": { | |
... // other tslint rules | |
"nx-enforce-module-boundaries": [ | |
true, | |
{ | |
"allow": [], | |
"depConstraints": [ | |
{ |
This file contains 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
{ | |
"npmScope": "ngconf", | |
"implicitDependencies": { | |
"angular.json": "*", | |
"package.json": "*", | |
"tsconfig.json": "*", | |
"tslint.json": "*", | |
"nx.json": "*" | |
}, | |
"projects": { |
This file contains 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 { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppComponent } from './app.component'; | |
import { WebSocketServicesModule } from './services/services.module'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], |
This file contains 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 { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { ErrorService } from './error.service'; | |
import { LogService } from './log.service'; | |
import { TableService } from './table.service'; | |
@NgModule({ | |
declarations: [ | |
], | |
imports: [ |
This file contains 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 { Injectable, Injector } from '@angular/core'; | |
import { Executioner } from '../model/executioner'; | |
import { ErrorUpdate } from '../model/error-update'; | |
import { Registry } from '../registry/registry.decorator'; | |
import { MessageTypeEnum } from '../model/message-type.enum'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
@Registry(MessageTypeEnum.ConsoleError) |
This file contains 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 { RegistryService } from './registry.service'; | |
import { MessageTypeEnum } from '../model/message-type.enum'; | |
export function Registry(id: MessageTypeEnum): Function { | |
return function decorator(target): void { | |
RegistryService.getRegistry().register(id, target); | |
}; | |
} |
This file contains 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 { Injector } from "@angular/core"; | |
export class ServiceLocator { | |
static injector: Injector; | |
} |
This file contains 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 { Injectable, Injector } from '@angular/core'; | |
import { Executioner } from '../model/executioner'; | |
import { ServiceLocator } from '../services/service-locator'; | |
import { MessageTypeEnum } from '../model/message-type.enum'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class RegistryService { | |
private static INSTANCE: RegistryService | undefined = null; |
This file contains 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 { Injector } from "@angular/core"; | |
import { MessageTypeEnum } from "../model/message-type.enum"; | |
import { LogService } from "../services/log.service"; | |
import { ErrorService } from "../services/error.service"; | |
import { TableService } from "../services/table.service"; | |
import { Executioner } from "../model/executioner"; | |
export class ServiceResolver { | |
static getService(message: MessageTypeEnum, injector: Injector): Executioner { | |
switch(message){ |
This file contains 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 { Injectable } from '@angular/core'; | |
import { Executioner } from '../model/executioner'; | |
import { ErrorUpdate } from '../model/error-update'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class ErrorService implements Executioner{ | |
NewerOlder