Skip to content

Instantly share code, notes, and snippets.

View buildmotion's full-sized avatar

Matt Vaughn buildmotion

View GitHub Profile
import { Component } from '@angular/core';
import {NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ModalComponent } from './modal/modal.component';
import { ModalAboutComponent } from './modal-about/modal-about.component';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { ModalComponent } from './modal/modal.component';
import { NgbModule, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { AboutComponent } from './about/about.component';
import { ModalAboutComponent } from './modal-about/modal-about.component';
{
"$schema": "./node_modules/@nrwl/schematics/src/schema.json",
"project": {
"name": "buildmotion-angular-workspace",
"npmScope": "buildmotion",
"latestMigration": "20180313-add-tags"
},
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { BrowserModule } from '@angular/platform-browser';
import { NxModule } from '@nrwl/nx';
@NgModule({
imports: [BrowserModule, NxModule.forRoot()],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { BrowserModule } from '@angular/platform-browser';
import { NxModule } from '@nrwl/nx';
import { BuildMotionLoggingModule } from '@buildmotion/logging';
@NgModule({
imports: [
BrowserModule,
BuildMotionLoggingModule,
NxModule.forRoot()
{
"$schema": "./../../node_modules/ng-packagr/package.schema.json",
"name": "@buildmotion/logging",
"version": "3.1.3",
"ngPackage": {
"lib": {
"entryFile": "./index.ts"
},
"dest": "./../../dist/@buildmotion/logging"
},
import { Injectable, Optional } from '@angular/core';
import { loggingServiceConfig } from './logging.service.config';
import { Severity } from './severity.enum';
@Injectable()
export class LoggingService {
applicationName = 'Angularlicio.us';
serviceName = 'LoggingService';
source: string;
severity: Severity;
message: string;
export enum Severity {
Information = 1,
Warning = 2,
Error = 3,
Critical = 4,
Debug = 5
}
export class AppComponent implements OnInit {
constructor(
private loggingService: LoggingService
) {}
ngOnInit() {
this.loggingService.log('AppComponent', Severity.Information, `How about some tacos, now??`);
}
}
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}