View tslint.json
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": [ | |
{ |
View nx.json
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": { |
View app.module.ts
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 | |
], |
View web-socket-services.module.ts
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: [ |
View error.service.ts
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) |
View registry.decorator.ts
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); | |
}; | |
} |
View service-locator.ts
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; | |
} |
View registry.service.ts
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; |
View service-resolver.ts
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){ |
View error.service.ts
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