;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/ng-packagr-demo/src/app/app.component.css
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | title = 'ng-packagr-demo';
10 | }
11 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { SuperLibModule } from 'my-first-super-lib';
4 | import { AppComponent } from './app.component';
5 |
6 | @NgModule({
7 | declarations: [AppComponent],
8 | imports: [BrowserModule, SuperLibModule],
9 | providers: [],
10 | bootstrap: [AppComponent],
11 | })
12 | export class AppModule {}
13 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/ng-packagr-demo/src/assets/.gitkeep
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | #
5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6 |
7 | > 0.5%
8 | last 2 versions
9 | Firefox ESR
10 | not dead
11 | not IE 9-11
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/ng-packagr-demo/src/favicon.ico
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NgPackagrDemo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": [
8 | "test.ts",
9 | "**/*.spec.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/README.md:
--------------------------------------------------------------------------------
1 | # This is my first super lib
2 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/bundles/my-first-super-lib.umd.min.js:
--------------------------------------------------------------------------------
1 | !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("my-first-super-lib",["exports","@angular/common","@angular/core"],o):o(e["my-first-super-lib"]={},e.ng.common,e.ng.core)}(this,function(e,o,n){"use strict";var r=function(){function e(){}return e.decorators=[{type:n.Component,args:[{selector:"super-lib-component",template:"\r\n Hello from an external template\r\n
\r\n"}]}],e}(),t=function(){function e(){}return e.decorators=[{type:n.NgModule,args:[{imports:[o.CommonModule],declarations:[r],exports:[r]}]}],e}();e.SuperLibComponent=r,e.SuperLibModule=t,Object.defineProperty(e,"__esModule",{value:!0})});
2 | //# sourceMappingURL=my-first-super-lib.umd.min.js.map
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/esm2015/my-first-super-lib.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview added by tsickle
3 | * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4 | */
5 | /**
6 | * Generated bundle index. Do not edit.
7 | */
8 | export { SuperLibComponent, SuperLibModule } from './public_api';
9 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXktZmlyc3Qtc3VwZXItbGliLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbXktZmlyc3Qtc3VwZXItbGliLyIsInNvdXJjZXMiOlsibXktZmlyc3Qtc3VwZXItbGliLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxrREFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/esm2015/public_api.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview added by tsickle
3 | * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4 | */
5 | export { SuperLibComponent } from './src/super-lib.component';
6 | export { SuperLibModule } from './src/super-lib.module';
7 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL215LWZpcnN0LXN1cGVyLWxpYi8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLGtDQUFjLDJCQUEyQixDQUFDO0FBQzFDLCtCQUFjLHdCQUF3QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zcmMvc3VwZXItbGliLmNvbXBvbmVudCc7XHJcbmV4cG9ydCAqIGZyb20gJy4vc3JjL3N1cGVyLWxpYi5tb2R1bGUnO1xyXG4iXX0=
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/esm5/my-first-super-lib.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview added by tsickle
3 | * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4 | */
5 | /**
6 | * Generated bundle index. Do not edit.
7 | */
8 | export { SuperLibComponent, SuperLibModule } from './public_api';
9 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXktZmlyc3Qtc3VwZXItbGliLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbXktZmlyc3Qtc3VwZXItbGliLyIsInNvdXJjZXMiOlsibXktZmlyc3Qtc3VwZXItbGliLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxrREFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/esm5/public_api.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview added by tsickle
3 | * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4 | */
5 | export { SuperLibComponent } from './src/super-lib.component';
6 | export { SuperLibModule } from './src/super-lib.module';
7 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL215LWZpcnN0LXN1cGVyLWxpYi8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLGtDQUFjLDJCQUEyQixDQUFDO0FBQzFDLCtCQUFjLHdCQUF3QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zcmMvc3VwZXItbGliLmNvbXBvbmVudCc7XHJcbmV4cG9ydCAqIGZyb20gJy4vc3JjL3N1cGVyLWxpYi5tb2R1bGUnO1xyXG4iXX0=
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/my-first-super-lib.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Generated bundle index. Do not edit.
3 | */
4 | export * from './public_api';
5 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-first-super-lib",
3 | "version": "0.0.1",
4 | "peerDependencies": {
5 | "@angular/core": ">=7.0.0",
6 | "@angular/common": ">=7.0.0"
7 | },
8 | "main": "bundles/my-first-super-lib.umd.js",
9 | "module": "fesm5/my-first-super-lib.js",
10 | "es2015": "fesm2015/my-first-super-lib.js",
11 | "esm5": "esm5/my-first-super-lib.js",
12 | "esm2015": "esm2015/my-first-super-lib.js",
13 | "fesm5": "fesm5/my-first-super-lib.js",
14 | "fesm2015": "fesm2015/my-first-super-lib.js",
15 | "typings": "my-first-super-lib.d.ts",
16 | "metadata": "my-first-super-lib.metadata.json",
17 | "sideEffects": false,
18 | "dependencies": {
19 | "tslib": "^1.9.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/public_api.d.ts:
--------------------------------------------------------------------------------
1 | export * from './src/super-lib.component';
2 | export * from './src/super-lib.module';
3 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/src/super-lib.component.d.ts:
--------------------------------------------------------------------------------
1 | export declare class SuperLibComponent {
2 | }
3 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/dist/src/super-lib.module.d.ts:
--------------------------------------------------------------------------------
1 | export declare class SuperLibModule {
2 | }
3 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "my-first-super-lib",
3 | "version": "0.0.1",
4 | "peerDependencies": {
5 | "@angular/core": ">=7.0.0",
6 | "@angular/common": ">=7.0.0"
7 | },
8 | "ngPackage": {
9 | "lib": {
10 | "entryFile": "public_api.ts"
11 | },
12 | "dest": "dist"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/public_api.ts:
--------------------------------------------------------------------------------
1 | export * from './src/super-lib.component';
2 | export * from './src/super-lib.module';
3 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/readme.md:
--------------------------------------------------------------------------------
1 | # This is my first super lib
2 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/src/super-lib.component.html:
--------------------------------------------------------------------------------
1 |
2 | Hello from an external template
3 |
4 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/src/super-lib.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'super-lib-component',
5 | templateUrl: 'super-lib.component.html',
6 | })
7 | export class SuperLibComponent {}
8 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/super-lib/src/super-lib.module.ts:
--------------------------------------------------------------------------------
1 | import { CommonModule } from '@angular/common';
2 | import { NgModule } from '@angular/core';
3 | import { SuperLibComponent } from './super-lib.component';
4 |
5 | @NgModule({
6 | imports: [CommonModule],
7 | declarations: [SuperLibComponent],
8 | exports: [SuperLibComponent],
9 | })
10 | export class SuperLibModule {}
11 |
--------------------------------------------------------------------------------
/m5/ng-packagr-demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "module": "es2015",
9 | "moduleResolution": "node",
10 | "emitDecoratorMetadata": true,
11 | "experimentalDecorators": true,
12 | "importHelpers": true,
13 | "target": "es5",
14 | "typeRoots": [
15 | "node_modules/@types"
16 | ],
17 | "lib": [
18 | "es2018",
19 | "dom"
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/angular-console-logger-0.0.1.tgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m6/angular-cli-app/dist/angular-console-logger/angular-console-logger-0.0.1.tgz
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/angular-console-logger.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Generated bundle index. Do not edit.
3 | */
4 | export * from './public_api';
5 | export { LoggerConfig as ɵa } from './lib/logger.config';
6 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/esm2015/lib/logger.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview added by tsickle
3 | * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4 | */
5 | export class LoggerConfig {
6 | }
7 | if (false) {
8 | /** @type {?} */
9 | LoggerConfig.prototype.isProduction;
10 | /** @type {?} */
11 | LoggerConfig.prototype.appPrefix;
12 | }
13 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItY29uc29sZS1sb2dnZXIvIiwic291cmNlcyI6WyJsaWIvbG9nZ2VyLmNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsTUFBTSxPQUFPLFlBQVk7Q0FHeEI7OztJQUZDLG9DQUFzQjs7SUFDdEIsaUNBQWtCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNsYXNzIExvZ2dlckNvbmZpZyB7XHJcbiAgaXNQcm9kdWN0aW9uOiBib29sZWFuO1xyXG4gIGFwcFByZWZpeDogc3RyaW5nO1xyXG59XHJcbiJdfQ==
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/lib/angular-console-logger.component.d.ts:
--------------------------------------------------------------------------------
1 | import { OnInit } from '@angular/core';
2 | export declare class AngularConsoleLoggerComponent implements OnInit {
3 | constructor();
4 | ngOnInit(): void;
5 | }
6 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/lib/angular-console-logger.module.d.ts:
--------------------------------------------------------------------------------
1 | import { ModuleWithProviders } from '@angular/core';
2 | import { LoggerConfig } from './logger.config';
3 | export declare class AngularConsoleLoggerModule {
4 | static forRoot(configuration: LoggerConfig): ModuleWithProviders;
5 | }
6 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/lib/angular-console-logger.service.d.ts:
--------------------------------------------------------------------------------
1 | import { LoggerConfig } from './logger.config';
2 | export declare abstract class AbstractLoggerService {
3 | abstract warn(message: string): any;
4 | abstract error(message: string): any;
5 | abstract info(message: string): any;
6 | }
7 | export declare class AngularConsoleLoggerService implements AbstractLoggerService {
8 | private loggerConfig;
9 | constructor(loggerConfig: LoggerConfig);
10 | warn(message: string): void;
11 | error(message: string): void;
12 | info(message: string): void;
13 | }
14 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/lib/logger.config.d.ts:
--------------------------------------------------------------------------------
1 | export declare class LoggerConfig {
2 | isProduction: boolean;
3 | appPrefix: string;
4 | }
5 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/node_modules/tslib/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=TypeScript
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/node_modules/tslib/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tslib",
3 | "authors": [
4 | "Microsoft Corp."
5 | ],
6 | "homepage": "http://typescriptlang.org/",
7 | "version": "1.9.3",
8 | "license": "Apache-2.0",
9 | "description": "Runtime library for TypeScript helper functions",
10 | "keywords": [
11 | "TypeScript",
12 | "Microsoft",
13 | "compiler",
14 | "language",
15 | "javascript",
16 | "tslib",
17 | "runtime"
18 | ],
19 | "repository": {
20 | "type": "git",
21 | "url": "https://github.com/Microsoft/tslib.git"
22 | },
23 | "main": "tslib.js",
24 | "ignore": [
25 | "**/.*",
26 | "node_modules",
27 | "bower_components",
28 | "docs",
29 | "package.json",
30 | ".npmignore",
31 | ".gitignore",
32 | ".gitattributes"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/node_modules/tslib/tslib.es6.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/node_modules/tslib/tslib.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-console-logger",
3 | "version": "0.0.1",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "tslib": {
8 | "version": "1.9.3",
9 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
10 | "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-console-logger",
3 | "version": "0.0.1",
4 | "peerDependencies": {
5 | "@angular/common": "^6.0.0-rc.0 || ^6.0.0",
6 | "@angular/core": "^6.0.0-rc.0 || ^6.0.0"
7 | },
8 | "main": "bundles/angular-console-logger.umd.js",
9 | "module": "fesm5/angular-console-logger.js",
10 | "es2015": "fesm2015/angular-console-logger.js",
11 | "esm5": "esm5/angular-console-logger.js",
12 | "esm2015": "esm2015/angular-console-logger.js",
13 | "fesm5": "fesm5/angular-console-logger.js",
14 | "fesm2015": "fesm2015/angular-console-logger.js",
15 | "typings": "angular-console-logger.d.ts",
16 | "metadata": "angular-console-logger.metadata.json",
17 | "sideEffects": false,
18 | "dependencies": {
19 | "tslib": "^1.9.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-console-logger/public_api.d.ts:
--------------------------------------------------------------------------------
1 | export * from './lib/angular-console-logger.service';
2 | export * from './lib/angular-console-logger.component';
3 | export * from './lib/angular-console-logger.module';
4 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/angular-rating-0.0.1.tgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m6/angular-cli-app/dist/angular-rating/angular-rating-0.0.1.tgz
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/angular-rating.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Generated bundle index. Do not edit.
3 | */
4 | export * from './public_api';
5 | export { AngularRatingComponent as ɵa } from './lib/angular-rating.component';
6 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/lib/angular-rating.component.d.ts:
--------------------------------------------------------------------------------
1 | import { EventEmitter, OnInit } from '@angular/core';
2 | export declare class AngularRatingComponent implements OnInit {
3 | ratingChanged: EventEmitter<{}>;
4 | rating: number;
5 | count: number;
6 | options: any[];
7 | constructor();
8 | ngOnInit(): void;
9 | changeRating(rating: number): void;
10 | }
11 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/lib/angular-rating.module.d.ts:
--------------------------------------------------------------------------------
1 | export declare class AngularRatingModule {
2 | }
3 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/lib/angular-rating.service.d.ts:
--------------------------------------------------------------------------------
1 | export declare class AngularRatingService {
2 | constructor();
3 | }
4 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/node_modules/tslib/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=TypeScript
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/node_modules/tslib/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tslib",
3 | "authors": [
4 | "Microsoft Corp."
5 | ],
6 | "homepage": "http://typescriptlang.org/",
7 | "version": "1.9.3",
8 | "license": "Apache-2.0",
9 | "description": "Runtime library for TypeScript helper functions",
10 | "keywords": [
11 | "TypeScript",
12 | "Microsoft",
13 | "compiler",
14 | "language",
15 | "javascript",
16 | "tslib",
17 | "runtime"
18 | ],
19 | "repository": {
20 | "type": "git",
21 | "url": "https://github.com/Microsoft/tslib.git"
22 | },
23 | "main": "tslib.js",
24 | "ignore": [
25 | "**/.*",
26 | "node_modules",
27 | "bower_components",
28 | "docs",
29 | "package.json",
30 | ".npmignore",
31 | ".gitignore",
32 | ".gitattributes"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/node_modules/tslib/tslib.es6.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/node_modules/tslib/tslib.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-rating",
3 | "version": "0.0.1",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "tslib": {
8 | "version": "1.9.3",
9 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
10 | "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-rating",
3 | "version": "0.0.1",
4 | "peerDependencies": {
5 | "@angular/common": "^6.0.0-rc.0 || ^6.0.0",
6 | "@angular/core": "^6.0.0-rc.0 || ^6.0.0"
7 | },
8 | "main": "bundles/angular-rating.umd.js",
9 | "module": "fesm5/angular-rating.js",
10 | "es2015": "fesm2015/angular-rating.js",
11 | "esm5": "esm5/angular-rating.js",
12 | "esm2015": "esm2015/angular-rating.js",
13 | "fesm5": "fesm5/angular-rating.js",
14 | "fesm2015": "fesm2015/angular-rating.js",
15 | "typings": "angular-rating.d.ts",
16 | "metadata": "angular-rating.metadata.json",
17 | "sideEffects": false,
18 | "dependencies": {
19 | "tslib": "^1.9.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/dist/angular-rating/public_api.d.ts:
--------------------------------------------------------------------------------
1 | export * from './lib/angular-rating.module';
2 | export * from './lib/angular-rating.service';
3 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/m6/angular-cli-app/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('workspace-project App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('Welcome to angularMaterialApp!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3 | "dest": "../../dist/angular-console-logger",
4 | "lib": {
5 | "entryFile": "src/public_api.ts"
6 | }
7 | }
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-console-logger",
3 | "version": "0.0.1",
4 | "peerDependencies": {
5 | "@angular/common": ">=7.0.0",
6 | "@angular/core": ">=7.0.0"
7 | }
8 | }
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/src/lib/angular-console-logger.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { AngularConsoleLoggerComponent } from './angular-console-logger.component';
4 |
5 | describe('AngularConsoleLoggerComponent', () => {
6 | let component: AngularConsoleLoggerComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ AngularConsoleLoggerComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(AngularConsoleLoggerComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/src/lib/angular-console-logger.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'lib-angular-console-logger',
5 | template: `
6 |
7 | angular-console-logger works!
8 |
9 | `,
10 | styles: []
11 | })
12 | export class AngularConsoleLoggerComponent implements OnInit {
13 |
14 | constructor() { }
15 |
16 | ngOnInit() {
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/src/lib/angular-console-logger.module.ts:
--------------------------------------------------------------------------------
1 | import { ModuleWithProviders, NgModule } from '@angular/core';
2 | import { AngularConsoleLoggerComponent } from './angular-console-logger.component';
3 | import { LoggerConfig } from './logger.config';
4 |
5 | @NgModule({
6 | imports: [],
7 | declarations: [AngularConsoleLoggerComponent],
8 | exports: [AngularConsoleLoggerComponent],
9 | })
10 | export class AngularConsoleLoggerModule {
11 | public static forRoot(configuration: LoggerConfig): ModuleWithProviders {
12 | return {
13 | ngModule: AngularConsoleLoggerModule,
14 | providers: [
15 | {
16 | provide: LoggerConfig,
17 | useValue: configuration,
18 | },
19 | ],
20 | };
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/src/lib/logger.config.ts:
--------------------------------------------------------------------------------
1 | export class LoggerConfig {
2 | isProduction: boolean;
3 | appPrefix: string;
4 | }
5 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/src/public_api.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Public API Surface of angular-console-logger
3 | */
4 |
5 | export * from './lib/angular-console-logger.service';
6 | export * from './lib/angular-console-logger.component';
7 | export * from './lib/angular-console-logger.module';
8 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'core-js/es7/reflect';
4 | import 'zone.js/dist/zone';
5 | import 'zone.js/dist/zone-testing';
6 | import { getTestBed } from '@angular/core/testing';
7 | import {
8 | BrowserDynamicTestingModule,
9 | platformBrowserDynamicTesting
10 | } from '@angular/platform-browser-dynamic/testing';
11 |
12 | declare const require: any;
13 |
14 | // First, initialize the Angular testing environment.
15 | getTestBed().initTestEnvironment(
16 | BrowserDynamicTestingModule,
17 | platformBrowserDynamicTesting()
18 | );
19 | // Then we find all the tests.
20 | const context = require.context('./', true, /\.spec\.ts$/);
21 | // And load the modules.
22 | context.keys().map(context);
23 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts"
12 | ],
13 | "include": [
14 | "**/*.spec.ts",
15 | "**/*.d.ts"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-console-logger/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "lib",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "lib",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3 | "dest": "../../dist/angular-rating",
4 | "lib": {
5 | "entryFile": "src/public_api.ts"
6 | }
7 | }
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-rating",
3 | "version": "0.0.1",
4 | "peerDependencies": {
5 | "@angular/common": ">=7.0.0",
6 | "@angular/core": ">=7.0.0"
7 | }
8 | }
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/src/lib/angular-rating.module.ts:
--------------------------------------------------------------------------------
1 | import { CommonModule } from '@angular/common';
2 | import { NgModule } from '@angular/core';
3 | import { AngularRatingComponent } from './angular-rating.component';
4 |
5 | @NgModule({
6 | imports: [CommonModule],
7 | declarations: [AngularRatingComponent],
8 | exports: [AngularRatingComponent],
9 | })
10 | export class AngularRatingModule {}
11 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/src/lib/angular-rating.service.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 |
3 | import { AngularRatingService } from './angular-rating.service';
4 |
5 | describe('AngularRatingService', () => {
6 | beforeEach(() => TestBed.configureTestingModule({}));
7 |
8 | it('should be created', () => {
9 | const service: AngularRatingService = TestBed.get(AngularRatingService);
10 | expect(service).toBeTruthy();
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/src/lib/angular-rating.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 |
3 | @Injectable({
4 | providedIn: 'root'
5 | })
6 | export class AngularRatingService {
7 |
8 | constructor() { }
9 | }
10 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/src/public_api.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Public API Surface of angular-rating
3 | */
4 |
5 | // export * from './lib/angular-rating.component';
6 | export * from './lib/angular-rating.module';
7 | export * from './lib/angular-rating.service';
8 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'core-js/es7/reflect';
4 | import 'zone.js/dist/zone';
5 | import 'zone.js/dist/zone-testing';
6 | import { getTestBed } from '@angular/core/testing';
7 | import {
8 | BrowserDynamicTestingModule,
9 | platformBrowserDynamicTesting
10 | } from '@angular/platform-browser-dynamic/testing';
11 |
12 | declare const require: any;
13 |
14 | // First, initialize the Angular testing environment.
15 | getTestBed().initTestEnvironment(
16 | BrowserDynamicTestingModule,
17 | platformBrowserDynamicTesting()
18 | );
19 | // Then we find all the tests.
20 | const context = require.context('./', true, /\.spec\.ts$/);
21 | // And load the modules.
22 | context.keys().map(context);
23 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../out-tsc/lib",
5 | "target": "es2015",
6 | "module": "es2015",
7 | "moduleResolution": "node",
8 | "declaration": true,
9 | "sourceMap": true,
10 | "inlineSources": true,
11 | "emitDecoratorMetadata": true,
12 | "experimentalDecorators": true,
13 | "importHelpers": true,
14 | "types": [],
15 | "lib": [
16 | "dom",
17 | "es2018"
18 | ]
19 | },
20 | "angularCompilerOptions": {
21 | "annotateForClosureCompiler": true,
22 | "skipTemplateCodegen": true,
23 | "strictMetadataEmit": true,
24 | "fullTemplateTypeCheck": true,
25 | "strictInjectionParameters": true,
26 | "enableResourceInlining": true
27 | },
28 | "exclude": [
29 | "src/test.ts",
30 | "**/*.spec.ts"
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts"
12 | ],
13 | "include": [
14 | "**/*.spec.ts",
15 | "**/*.d.ts"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/projects/angular-rating/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "lib",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "lib",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/app.component.css:
--------------------------------------------------------------------------------
1 | mat-sidenav {
2 | width: 320px;
3 | }
4 |
5 | .app-content-centered {
6 | display: flex;
7 | align-items: center;
8 | justify-content: center;
9 | }
10 |
11 | .aligner-item {
12 | width: 70%;
13 | }
14 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css'],
7 | })
8 | export class AppComponent {
9 | title = 'Book tracker';
10 |
11 | navItems: any[] = [
12 | { name: 'Overview', route: 'books' },
13 | { name: 'Add new book', route: 'books/create' },
14 | ];
15 | }
16 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/app.routing.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 |
3 | export const AppRoutes: Routes = [
4 | { path: '', redirectTo: 'books', pathMatch: 'full' },
5 | {
6 | path: 'books',
7 | loadChildren: './books/books.module#BooksModule',
8 | },
9 | {
10 | path: '**',
11 | redirectTo: 'books',
12 | },
13 | ];
14 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/books.routing.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 | import { BookDetailsComponent } from './container/book-details/book-details.component';
3 | import { BookFormComponent } from './container/book-form/book-form.component';
4 | import { BooksOverviewComponent } from './container/books-overview/books-overview.component';
5 |
6 | export const BooksRoutes: Routes = [
7 | { path: '', redirectTo: 'overview', pathMatch: 'full' },
8 | { path: 'overview', component: BooksOverviewComponent },
9 | { path: 'create', component: BookFormComponent },
10 | { path: 'edit/:id', component: BookFormComponent },
11 | { path: 'details/:id', component: BookDetailsComponent }
12 | ];
13 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/container/book-details/book-details.component.css:
--------------------------------------------------------------------------------
1 | .mat-form-field-disabled .mat-form-field-underline {
2 | height: 0;
3 | }
4 |
5 | .mat-input-element:disabled {
6 | color: gray;
7 | }
8 |
9 | .mat-raised-button {
10 | margin-right: 10px;
11 | }
12 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/container/book-details/book-details.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { BookDetailsComponent } from './book-details.component';
4 |
5 | describe('BookDetailsComponent', () => {
6 | let component: BookDetailsComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ BookDetailsComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(BookDetailsComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/container/book-form/book-form.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m6/angular-cli-app/src/app/books/container/book-form/book-form.component.css
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/container/book-form/book-form.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { BookFormComponent } from './book-form.component';
3 |
4 | describe('CreateBookComponent', () => {
5 | let component: BookFormComponent;
6 | let fixture: ComponentFixture;
7 |
8 | beforeEach(async(() => {
9 | TestBed.configureTestingModule({
10 | declarations: [BookFormComponent]
11 | }).compileComponents();
12 | }));
13 |
14 | beforeEach(() => {
15 | fixture = TestBed.createComponent(BookFormComponent);
16 | component = fixture.componentInstance;
17 | fixture.detectChanges();
18 | });
19 |
20 | it('should create', () => {
21 | expect(component).toBeTruthy();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/container/books-overview/books-overview.component.css:
--------------------------------------------------------------------------------
1 | .fab-bottom-right {
2 | position: fixed;
3 | right: 50px;
4 | bottom: 50px;
5 | z-index: 100;
6 | }
7 |
8 | .fab-bottom-right a {
9 | color: white;
10 | }
11 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/container/books-overview/books-overview.component.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
21 |
24 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/container/books-overview/books-overview.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { BooksOverviewComponent } from './books-overview.component';
3 |
4 | describe('OverviewComponent', () => {
5 | let component: BooksOverviewComponent;
6 | let fixture: ComponentFixture;
7 |
8 | beforeEach(async(() => {
9 | TestBed.configureTestingModule({
10 | declarations: [BooksOverviewComponent],
11 | }).compileComponents();
12 | }));
13 |
14 | beforeEach(() => {
15 | fixture = TestBed.createComponent(BooksOverviewComponent);
16 | component = fixture.componentInstance;
17 | fixture.detectChanges();
18 | });
19 |
20 | it('should create', () => {
21 | expect(component).toBeTruthy();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/container/index.ts:
--------------------------------------------------------------------------------
1 | import { BookDetailsComponent } from './book-details/book-details.component';
2 | import { BookFormComponent } from './book-form/book-form.component';
3 | import { BooksOverviewComponent } from './books-overview/books-overview.component';
4 |
5 | export const allContainerComponents = [
6 | BookDetailsComponent,
7 | BookFormComponent,
8 | BooksOverviewComponent
9 | ];
10 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/presentational/book-list/book-list.component.css:
--------------------------------------------------------------------------------
1 | .fill-remaining-space {
2 | flex: 1 1 auto;
3 | }
4 |
5 | .mat-raised-button {
6 | margin-right: 10px;
7 | }
8 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/presentational/book-list/book-list.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { BookListComponent } from './book-list.component';
3 |
4 | describe('BooksListComponent', () => {
5 | let component: BookListComponent;
6 | let fixture: ComponentFixture;
7 |
8 | beforeEach(async(() => {
9 | TestBed.configureTestingModule({
10 | declarations: [BookListComponent],
11 | }).compileComponents();
12 | }));
13 |
14 | beforeEach(() => {
15 | fixture = TestBed.createComponent(BookListComponent);
16 | component = fixture.componentInstance;
17 | fixture.detectChanges();
18 | });
19 |
20 | it('should create', () => {
21 | expect(component).toBeTruthy();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/books/presentational/index.ts:
--------------------------------------------------------------------------------
1 | import { BookListComponent } from './book-list/book-list.component';
2 |
3 | export const allPresentationalComponents = [BookListComponent];
4 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/core/core.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import {
3 | AngularConsoleLoggerModule,
4 | AngularConsoleLoggerService,
5 | } from 'angular-console-logger';
6 | import { CustomLoggerService } from './services/custom-logger.service';
7 |
8 | @NgModule({
9 | imports: [
10 | AngularConsoleLoggerModule.forRoot({
11 | isProduction: false,
12 | appPrefix: 'pluralsight-app',
13 | }),
14 | ],
15 | providers: [
16 | { provide: AngularConsoleLoggerService, useClass: CustomLoggerService },
17 | ],
18 | })
19 | export class CoreModule {}
20 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/core/services/custom-logger.service.ts:
--------------------------------------------------------------------------------
1 | import { AbstractLoggerService } from 'angular-console-logger';
2 |
3 | export class CustomLoggerService implements AbstractLoggerService {
4 | info(message: string) {
5 | console.log('Hello from CustomLoggerService: ' + message);
6 | }
7 |
8 | warn(message: string) {
9 | console.warn('Hello from CustomLoggerService: ' + message);
10 | }
11 |
12 | error(message: string) {
13 | console.error('Hello from CustomLoggerService: ' + message);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/core/services/http-base.service.ts:
--------------------------------------------------------------------------------
1 | import { HttpClient } from '@angular/common/http';
2 | import { Injectable } from '@angular/core';
3 | import { Observable } from 'rxjs';
4 |
5 | @Injectable({ providedIn: 'root' })
6 | export class HttpBaseService {
7 | constructor(private http: HttpClient) {}
8 |
9 | get(url: string, options = {}): Observable {
10 | return this.http.get(url, options);
11 | }
12 |
13 | post(url: string, body: any): Observable {
14 | return this.http.post(url, body);
15 | }
16 |
17 | put(url: string, body: any): Observable {
18 | return this.http.put(url, body);
19 | }
20 |
21 | delete(url: string): Observable {
22 | return this.http.delete(url);
23 | }
24 |
25 | patch(url: string, body: any): Observable {
26 | return this.http.patch(url, body);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/core/services/notification.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { MatSnackBar } from '@angular/material';
3 |
4 | @Injectable({ providedIn: 'root' })
5 | export class NotificationService {
6 | constructor(private snackBar: MatSnackBar) {}
7 |
8 | show(message: string) {
9 | this.snackBar.open(message, '', {
10 | duration: 2000
11 | });
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/shared/models/book.ts:
--------------------------------------------------------------------------------
1 | export class Book {
2 | id: number;
3 | read: boolean;
4 | title: string;
5 | author: string;
6 | description: string;
7 | genre: string;
8 | rating: number;
9 | }
10 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/app/shared/shared.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { MaterialModule } from './material.module';
3 |
4 | @NgModule({
5 | imports: [MaterialModule],
6 | exports: [MaterialModule],
7 | })
8 | export class SharedModule {}
9 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m6/angular-cli-app/src/assets/.gitkeep
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | #
5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6 |
7 | > 0.5%
8 | last 2 versions
9 | Firefox ESR
10 | not dead
11 | not IE 9-11
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m6/angular-cli-app/src/favicon.ico
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 | AngularMaterialApp
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 | import 'hammerjs';
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic()
12 | .bootstrapModule(AppModule)
13 | .catch(err => console.error(err));
14 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/styles.css:
--------------------------------------------------------------------------------
1 | @import '~@angular/material/prebuilt-themes/indigo-pink.css';
2 | @import 'https://fonts.googleapis.com/css?family=Roboto:400,300';
3 |
4 | html,
5 | body {
6 | display: flex;
7 | flex-direction: column;
8 |
9 | font-family: Roboto, Arial, sans-serif;
10 | margin: 0;
11 | height: 100%;
12 | }
13 |
14 | .basic-container {
15 | padding: 30px;
16 | }
17 |
18 | .form-container {
19 | display: flex;
20 | flex-direction: column;
21 | margin-top: 30px;
22 | }
23 |
24 | .form-container > * {
25 | width: 100%;
26 | }
27 |
28 | mat-form-field[hidden] {
29 | display: none;
30 | }
31 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": ["test.ts", "**/*.spec.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/m6/angular-cli-app/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m6/consumerApp/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/m6/consumerApp/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # profiling files
12 | chrome-profiler-events.json
13 | speed-measure-plugin.json
14 |
15 | # IDEs and editors
16 | /.idea
17 | .project
18 | .classpath
19 | .c9/
20 | *.launch
21 | .settings/
22 | *.sublime-workspace
23 |
24 | # IDE - VSCode
25 | .vscode/*
26 | !.vscode/settings.json
27 | !.vscode/tasks.json
28 | !.vscode/launch.json
29 | !.vscode/extensions.json
30 | .history/*
31 |
32 | # misc
33 | /.sass-cache
34 | /connect.lock
35 | /coverage
36 | /libpeerconnection.log
37 | npm-debug.log
38 | yarn-error.log
39 | testem.log
40 | /typings
41 |
42 | # System Files
43 | .DS_Store
44 | Thumbs.db
45 |
--------------------------------------------------------------------------------
/m6/consumerApp/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/m6/consumerApp/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 | import { browser, logging } from 'protractor';
3 |
4 | describe('workspace-project App', () => {
5 | let page: AppPage;
6 |
7 | beforeEach(() => {
8 | page = new AppPage();
9 | });
10 |
11 | it('should display welcome message', () => {
12 | page.navigateTo();
13 | expect(page.getTitleText()).toEqual('Welcome to consumerApp!');
14 | });
15 |
16 | afterEach(async () => {
17 | // Assert that there are no errors emitted from the browser
18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19 | expect(logs).not.toContain(jasmine.objectContaining({
20 | level: logging.Level.SEVERE,
21 | }));
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/m6/consumerApp/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get(browser.baseUrl) as Promise;
6 | }
7 |
8 | getTitleText() {
9 | return element(by.css('app-root h1')).getText() as Promise;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/m6/consumerApp/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/m6/consumerApp/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m6/consumerApp/src/app/app.component.css
--------------------------------------------------------------------------------
/m6/consumerApp/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { AngularConsoleLoggerService } from 'angular-console-logger';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: './app.component.html',
7 | styleUrls: ['./app.component.css'],
8 | })
9 | export class AppComponent {
10 | title = 'consumerApp';
11 |
12 | selectedRating = 5;
13 |
14 | constructor(private logger: AngularConsoleLoggerService) {}
15 |
16 | ratingChanged(rating: number) {
17 | this.selectedRating = rating;
18 | this.logger.info(`${rating} was selected`);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { AngularConsoleLoggerModule } from 'angular-console-logger';
4 | import { AngularRatingModule } from 'angular-rating';
5 | import { environment } from '../environments/environment';
6 | import { AppComponent } from './app.component';
7 |
8 | @NgModule({
9 | declarations: [AppComponent],
10 | imports: [
11 | BrowserModule,
12 | AngularConsoleLoggerModule.forRoot({
13 | appPrefix: 'consumerApp',
14 | isProduction: environment.production,
15 | }),
16 | AngularRatingModule,
17 | ],
18 | providers: [],
19 | bootstrap: [AppComponent],
20 | })
21 | export class AppModule {}
22 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m6/consumerApp/src/assets/.gitkeep
--------------------------------------------------------------------------------
/m6/consumerApp/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | #
5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6 |
7 | > 0.5%
8 | last 2 versions
9 | Firefox ESR
10 | not dead
11 | not IE 9-11
--------------------------------------------------------------------------------
/m6/consumerApp/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m6/consumerApp/src/favicon.ico
--------------------------------------------------------------------------------
/m6/consumerApp/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ConsumerApp
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": [
8 | "test.ts",
9 | "**/*.spec.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/m6/consumerApp/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m6/consumerApp/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "module": "es2015",
9 | "moduleResolution": "node",
10 | "emitDecoratorMetadata": true,
11 | "experimentalDecorators": true,
12 | "importHelpers": true,
13 | "target": "es5",
14 | "typeRoots": [
15 | "node_modules/@types"
16 | ],
17 | "lib": [
18 | "es2018",
19 | "dom"
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/m7/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m7/.gitkeep
--------------------------------------------------------------------------------
/m7/angular-cli-app/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-console-logger/README.md:
--------------------------------------------------------------------------------
1 | # this is an angular logging library
2 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-console-logger/esm2015/lib/logger.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @fileoverview added by tsickle
3 | * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4 | */
5 | export class LoggerConfig {
6 | }
7 | if (false) {
8 | /** @type {?} */
9 | LoggerConfig.prototype.isProduction;
10 | /** @type {?} */
11 | LoggerConfig.prototype.appPrefix;
12 | }
13 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BmYWJpYW5nb3NlYnJpbmsvYW5ndWxhci1jb25zb2xlLWxvZ2dlci8iLCJzb3VyY2VzIjpbImxpYi9sb2dnZXIuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxNQUFNLE9BQU8sWUFBWTtDQUd4Qjs7O0lBRkMsb0NBQXNCOztJQUN0QixpQ0FBa0IiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgTG9nZ2VyQ29uZmlnIHtcclxuICBpc1Byb2R1Y3Rpb246IGJvb2xlYW47XHJcbiAgYXBwUHJlZml4OiBzdHJpbmc7XHJcbn1cclxuIl19
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-console-logger/fabiangosebrink-angular-console-logger.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Generated bundle index. Do not edit.
3 | */
4 | export * from './public_api';
5 | export { LoggerConfig as ɵa } from './lib/logger.config';
6 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-console-logger/lib/angular-console-logger.component.d.ts:
--------------------------------------------------------------------------------
1 | import { OnInit } from '@angular/core';
2 | export declare class AngularConsoleLoggerComponent implements OnInit {
3 | constructor();
4 | ngOnInit(): void;
5 | }
6 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-console-logger/lib/angular-console-logger.module.d.ts:
--------------------------------------------------------------------------------
1 | import { ModuleWithProviders } from '@angular/core';
2 | import { LoggerConfig } from './logger.config';
3 | export declare class AngularConsoleLoggerModule {
4 | static forRoot(configuration: LoggerConfig): ModuleWithProviders;
5 | }
6 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-console-logger/lib/angular-console-logger.service.d.ts:
--------------------------------------------------------------------------------
1 | import { LoggerConfig } from './logger.config';
2 | export declare abstract class AbstractLoggerService {
3 | abstract warn(message: string): any;
4 | abstract error(message: string): any;
5 | abstract info(message: string): any;
6 | }
7 | export declare class AngularConsoleLoggerService implements AbstractLoggerService {
8 | private loggerConfig;
9 | constructor(loggerConfig: LoggerConfig);
10 | warn(message: string): void;
11 | error(message: string): void;
12 | info(message: string): void;
13 | }
14 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-console-logger/lib/logger.config.d.ts:
--------------------------------------------------------------------------------
1 | export declare class LoggerConfig {
2 | isProduction: boolean;
3 | appPrefix: string;
4 | }
5 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-console-logger/public_api.d.ts:
--------------------------------------------------------------------------------
1 | export * from './lib/angular-console-logger.service';
2 | export * from './lib/angular-console-logger.component';
3 | export * from './lib/angular-console-logger.module';
4 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-rating/README.md:
--------------------------------------------------------------------------------
1 | # this is an angular rating library
2 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-rating/fabiangosebrink-angular-rating.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Generated bundle index. Do not edit.
3 | */
4 | export * from './public_api';
5 | export { AngularRatingComponent as ɵa } from './lib/angular-rating.component';
6 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-rating/lib/angular-rating.component.d.ts:
--------------------------------------------------------------------------------
1 | import { EventEmitter, OnInit } from '@angular/core';
2 | export declare class AngularRatingComponent implements OnInit {
3 | ratingChanged: EventEmitter<{}>;
4 | rating: number;
5 | count: number;
6 | options: any[];
7 | constructor();
8 | ngOnInit(): void;
9 | changeRating(rating: number): void;
10 | }
11 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-rating/lib/angular-rating.module.d.ts:
--------------------------------------------------------------------------------
1 | export declare class AngularRatingModule {
2 | }
3 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-rating/lib/angular-rating.service.d.ts:
--------------------------------------------------------------------------------
1 | export declare class AngularRatingService {
2 | constructor();
3 | }
4 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-rating/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@fabiangosebrink/angular-rating",
3 | "version": "0.0.6",
4 | "peerDependencies": {
5 | "@angular/common": ">=7.0.0",
6 | "@angular/core": ">=7.0.0"
7 | },
8 | "main": "bundles/fabiangosebrink-angular-rating.umd.js",
9 | "module": "fesm5/fabiangosebrink-angular-rating.js",
10 | "es2015": "fesm2015/fabiangosebrink-angular-rating.js",
11 | "esm5": "esm5/fabiangosebrink-angular-rating.js",
12 | "esm2015": "esm2015/fabiangosebrink-angular-rating.js",
13 | "fesm5": "fesm5/fabiangosebrink-angular-rating.js",
14 | "fesm2015": "fesm2015/fabiangosebrink-angular-rating.js",
15 | "typings": "fabiangosebrink-angular-rating.d.ts",
16 | "metadata": "fabiangosebrink-angular-rating.metadata.json",
17 | "sideEffects": false,
18 | "dependencies": {
19 | "tslib": "^1.9.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/dist/angular-rating/public_api.d.ts:
--------------------------------------------------------------------------------
1 | export * from './lib/angular-rating.module';
2 | export * from './lib/angular-rating.service';
3 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/m7/angular-cli-app/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('workspace-project App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('Welcome to angularMaterialApp!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3 | "dest": "../../dist/angular-console-logger",
4 | "lib": {
5 | "entryFile": "src/public_api.ts"
6 | }
7 | }
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@fabiangosebrink/angular-console-logger",
3 | "version": "0.0.3",
4 | "peerDependencies": {
5 | "@angular/common": ">=7.0.0",
6 | "@angular/core": ">=7.0.0"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/readme.md:
--------------------------------------------------------------------------------
1 | # this is an angular logging library
2 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/src/lib/angular-console-logger.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { AngularConsoleLoggerComponent } from './angular-console-logger.component';
4 |
5 | describe('AngularConsoleLoggerComponent', () => {
6 | let component: AngularConsoleLoggerComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ AngularConsoleLoggerComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(AngularConsoleLoggerComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/src/lib/angular-console-logger.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'lib-angular-console-logger',
5 | template: `
6 |
7 | angular-console-logger works!
8 |
9 | `,
10 | styles: []
11 | })
12 | export class AngularConsoleLoggerComponent implements OnInit {
13 |
14 | constructor() { }
15 |
16 | ngOnInit() {
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/src/lib/angular-console-logger.module.ts:
--------------------------------------------------------------------------------
1 | import { ModuleWithProviders, NgModule } from '@angular/core';
2 | import { AngularConsoleLoggerComponent } from './angular-console-logger.component';
3 | import { LoggerConfig } from './logger.config';
4 |
5 | @NgModule({
6 | imports: [],
7 | declarations: [AngularConsoleLoggerComponent],
8 | exports: [AngularConsoleLoggerComponent],
9 | })
10 | export class AngularConsoleLoggerModule {
11 | public static forRoot(configuration: LoggerConfig): ModuleWithProviders {
12 | return {
13 | ngModule: AngularConsoleLoggerModule,
14 | providers: [
15 | {
16 | provide: LoggerConfig,
17 | useValue: configuration,
18 | },
19 | ],
20 | };
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/src/lib/logger.config.ts:
--------------------------------------------------------------------------------
1 | export class LoggerConfig {
2 | isProduction: boolean;
3 | appPrefix: string;
4 | }
5 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/src/public_api.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Public API Surface of angular-console-logger
3 | */
4 |
5 | export * from './lib/angular-console-logger.service';
6 | export * from './lib/angular-console-logger.component';
7 | export * from './lib/angular-console-logger.module';
8 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'core-js/es7/reflect';
4 | import 'zone.js/dist/zone';
5 | import 'zone.js/dist/zone-testing';
6 | import { getTestBed } from '@angular/core/testing';
7 | import {
8 | BrowserDynamicTestingModule,
9 | platformBrowserDynamicTesting
10 | } from '@angular/platform-browser-dynamic/testing';
11 |
12 | declare const require: any;
13 |
14 | // First, initialize the Angular testing environment.
15 | getTestBed().initTestEnvironment(
16 | BrowserDynamicTestingModule,
17 | platformBrowserDynamicTesting()
18 | );
19 | // Then we find all the tests.
20 | const context = require.context('./', true, /\.spec\.ts$/);
21 | // And load the modules.
22 | context.keys().map(context);
23 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts"
12 | ],
13 | "include": [
14 | "**/*.spec.ts",
15 | "**/*.d.ts"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-console-logger/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "lib",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "lib",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3 | "dest": "../../dist/angular-rating",
4 | "lib": {
5 | "entryFile": "src/public_api.ts"
6 | }
7 | }
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@fabiangosebrink/angular-rating",
3 | "version": "0.0.6",
4 | "peerDependencies": {
5 | "@angular/common": ">=7.0.0",
6 | "@angular/core": ">=7.0.0"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/readme.md:
--------------------------------------------------------------------------------
1 | # this is an angular rating library
2 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/src/lib/angular-rating.module.ts:
--------------------------------------------------------------------------------
1 | import { CommonModule } from '@angular/common';
2 | import { NgModule } from '@angular/core';
3 | import { AngularRatingComponent } from './angular-rating.component';
4 |
5 | @NgModule({
6 | imports: [CommonModule],
7 | declarations: [AngularRatingComponent],
8 | exports: [AngularRatingComponent],
9 | })
10 | export class AngularRatingModule {}
11 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/src/lib/angular-rating.service.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed } from '@angular/core/testing';
2 |
3 | import { AngularRatingService } from './angular-rating.service';
4 |
5 | describe('AngularRatingService', () => {
6 | beforeEach(() => TestBed.configureTestingModule({}));
7 |
8 | it('should be created', () => {
9 | const service: AngularRatingService = TestBed.get(AngularRatingService);
10 | expect(service).toBeTruthy();
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/src/lib/angular-rating.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 |
3 | @Injectable({
4 | providedIn: 'root'
5 | })
6 | export class AngularRatingService {
7 |
8 | constructor() { }
9 | }
10 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/src/public_api.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Public API Surface of angular-rating
3 | */
4 |
5 | // export * from './lib/angular-rating.component';
6 | export * from './lib/angular-rating.module';
7 | export * from './lib/angular-rating.service';
8 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'core-js/es7/reflect';
4 | import 'zone.js/dist/zone';
5 | import 'zone.js/dist/zone-testing';
6 | import { getTestBed } from '@angular/core/testing';
7 | import {
8 | BrowserDynamicTestingModule,
9 | platformBrowserDynamicTesting
10 | } from '@angular/platform-browser-dynamic/testing';
11 |
12 | declare const require: any;
13 |
14 | // First, initialize the Angular testing environment.
15 | getTestBed().initTestEnvironment(
16 | BrowserDynamicTestingModule,
17 | platformBrowserDynamicTesting()
18 | );
19 | // Then we find all the tests.
20 | const context = require.context('./', true, /\.spec\.ts$/);
21 | // And load the modules.
22 | context.keys().map(context);
23 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../out-tsc/lib",
5 | "target": "es2015",
6 | "module": "es2015",
7 | "moduleResolution": "node",
8 | "declaration": true,
9 | "sourceMap": true,
10 | "inlineSources": true,
11 | "emitDecoratorMetadata": true,
12 | "experimentalDecorators": true,
13 | "importHelpers": true,
14 | "types": [],
15 | "lib": [
16 | "dom",
17 | "es2018"
18 | ]
19 | },
20 | "angularCompilerOptions": {
21 | "annotateForClosureCompiler": true,
22 | "skipTemplateCodegen": true,
23 | "strictMetadataEmit": true,
24 | "fullTemplateTypeCheck": true,
25 | "strictInjectionParameters": true,
26 | "enableResourceInlining": true
27 | },
28 | "exclude": [
29 | "src/test.ts",
30 | "**/*.spec.ts"
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "src/test.ts"
12 | ],
13 | "include": [
14 | "**/*.spec.ts",
15 | "**/*.d.ts"
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/projects/angular-rating/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "lib",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "lib",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/app.component.css:
--------------------------------------------------------------------------------
1 | mat-sidenav {
2 | width: 320px;
3 | }
4 |
5 | .app-content-centered {
6 | display: flex;
7 | align-items: center;
8 | justify-content: center;
9 | }
10 |
11 | .aligner-item {
12 | width: 70%;
13 | }
14 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css'],
7 | })
8 | export class AppComponent {
9 | title = 'Book tracker';
10 |
11 | navItems: any[] = [
12 | { name: 'Overview', route: 'books' },
13 | { name: 'Add new book', route: 'books/create' },
14 | ];
15 | }
16 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/app.routing.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 |
3 | export const AppRoutes: Routes = [
4 | { path: '', redirectTo: 'books', pathMatch: 'full' },
5 | {
6 | path: 'books',
7 | loadChildren: './books/books.module#BooksModule',
8 | },
9 | {
10 | path: '**',
11 | redirectTo: 'books',
12 | },
13 | ];
14 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/books.routing.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 | import { BookDetailsComponent } from './container/book-details/book-details.component';
3 | import { BookFormComponent } from './container/book-form/book-form.component';
4 | import { BooksOverviewComponent } from './container/books-overview/books-overview.component';
5 |
6 | export const BooksRoutes: Routes = [
7 | { path: '', redirectTo: 'overview', pathMatch: 'full' },
8 | { path: 'overview', component: BooksOverviewComponent },
9 | { path: 'create', component: BookFormComponent },
10 | { path: 'edit/:id', component: BookFormComponent },
11 | { path: 'details/:id', component: BookDetailsComponent }
12 | ];
13 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/container/book-details/book-details.component.css:
--------------------------------------------------------------------------------
1 | .mat-form-field-disabled .mat-form-field-underline {
2 | height: 0;
3 | }
4 |
5 | .mat-input-element:disabled {
6 | color: gray;
7 | }
8 |
9 | .mat-raised-button {
10 | margin-right: 10px;
11 | }
12 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/container/book-details/book-details.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { BookDetailsComponent } from './book-details.component';
4 |
5 | describe('BookDetailsComponent', () => {
6 | let component: BookDetailsComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ BookDetailsComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(BookDetailsComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/container/book-form/book-form.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m7/angular-cli-app/src/app/books/container/book-form/book-form.component.css
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/container/book-form/book-form.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { BookFormComponent } from './book-form.component';
3 |
4 | describe('CreateBookComponent', () => {
5 | let component: BookFormComponent;
6 | let fixture: ComponentFixture;
7 |
8 | beforeEach(async(() => {
9 | TestBed.configureTestingModule({
10 | declarations: [BookFormComponent]
11 | }).compileComponents();
12 | }));
13 |
14 | beforeEach(() => {
15 | fixture = TestBed.createComponent(BookFormComponent);
16 | component = fixture.componentInstance;
17 | fixture.detectChanges();
18 | });
19 |
20 | it('should create', () => {
21 | expect(component).toBeTruthy();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/container/books-overview/books-overview.component.css:
--------------------------------------------------------------------------------
1 | .fab-bottom-right {
2 | position: fixed;
3 | right: 50px;
4 | bottom: 50px;
5 | z-index: 100;
6 | }
7 |
8 | .fab-bottom-right a {
9 | color: white;
10 | }
11 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/container/books-overview/books-overview.component.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
21 |
24 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/container/books-overview/books-overview.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { BooksOverviewComponent } from './books-overview.component';
3 |
4 | describe('OverviewComponent', () => {
5 | let component: BooksOverviewComponent;
6 | let fixture: ComponentFixture;
7 |
8 | beforeEach(async(() => {
9 | TestBed.configureTestingModule({
10 | declarations: [BooksOverviewComponent],
11 | }).compileComponents();
12 | }));
13 |
14 | beforeEach(() => {
15 | fixture = TestBed.createComponent(BooksOverviewComponent);
16 | component = fixture.componentInstance;
17 | fixture.detectChanges();
18 | });
19 |
20 | it('should create', () => {
21 | expect(component).toBeTruthy();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/container/index.ts:
--------------------------------------------------------------------------------
1 | import { BookDetailsComponent } from './book-details/book-details.component';
2 | import { BookFormComponent } from './book-form/book-form.component';
3 | import { BooksOverviewComponent } from './books-overview/books-overview.component';
4 |
5 | export const allContainerComponents = [
6 | BookDetailsComponent,
7 | BookFormComponent,
8 | BooksOverviewComponent
9 | ];
10 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/presentational/book-list/book-list.component.css:
--------------------------------------------------------------------------------
1 | .fill-remaining-space {
2 | flex: 1 1 auto;
3 | }
4 |
5 | .mat-raised-button {
6 | margin-right: 10px;
7 | }
8 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/presentational/book-list/book-list.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 | import { BookListComponent } from './book-list.component';
3 |
4 | describe('BooksListComponent', () => {
5 | let component: BookListComponent;
6 | let fixture: ComponentFixture;
7 |
8 | beforeEach(async(() => {
9 | TestBed.configureTestingModule({
10 | declarations: [BookListComponent],
11 | }).compileComponents();
12 | }));
13 |
14 | beforeEach(() => {
15 | fixture = TestBed.createComponent(BookListComponent);
16 | component = fixture.componentInstance;
17 | fixture.detectChanges();
18 | });
19 |
20 | it('should create', () => {
21 | expect(component).toBeTruthy();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/books/presentational/index.ts:
--------------------------------------------------------------------------------
1 | import { BookListComponent } from './book-list/book-list.component';
2 |
3 | export const allPresentationalComponents = [BookListComponent];
4 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/core/core.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import {
3 | AngularConsoleLoggerModule,
4 | AngularConsoleLoggerService,
5 | } from 'angular-console-logger';
6 | import { CustomLoggerService } from './services/custom-logger.service';
7 |
8 | @NgModule({
9 | imports: [
10 | AngularConsoleLoggerModule.forRoot({
11 | isProduction: false,
12 | appPrefix: 'pluralsight-app',
13 | }),
14 | ],
15 | providers: [
16 | { provide: AngularConsoleLoggerService, useClass: CustomLoggerService },
17 | ],
18 | })
19 | export class CoreModule {}
20 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/core/services/custom-logger.service.ts:
--------------------------------------------------------------------------------
1 | import { AbstractLoggerService } from 'angular-console-logger';
2 |
3 | export class CustomLoggerService implements AbstractLoggerService {
4 | info(message: string) {
5 | console.log('Hello from CustomLoggerService: ' + message);
6 | }
7 |
8 | warn(message: string) {
9 | console.warn('Hello from CustomLoggerService: ' + message);
10 | }
11 |
12 | error(message: string) {
13 | console.error('Hello from CustomLoggerService: ' + message);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/core/services/http-base.service.ts:
--------------------------------------------------------------------------------
1 | import { HttpClient } from '@angular/common/http';
2 | import { Injectable } from '@angular/core';
3 | import { Observable } from 'rxjs';
4 |
5 | @Injectable({ providedIn: 'root' })
6 | export class HttpBaseService {
7 | constructor(private http: HttpClient) {}
8 |
9 | get(url: string, options = {}): Observable {
10 | return this.http.get(url, options);
11 | }
12 |
13 | post(url: string, body: any): Observable {
14 | return this.http.post(url, body);
15 | }
16 |
17 | put(url: string, body: any): Observable {
18 | return this.http.put(url, body);
19 | }
20 |
21 | delete(url: string): Observable {
22 | return this.http.delete(url);
23 | }
24 |
25 | patch(url: string, body: any): Observable {
26 | return this.http.patch(url, body);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/core/services/notification.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { MatSnackBar } from '@angular/material';
3 |
4 | @Injectable({ providedIn: 'root' })
5 | export class NotificationService {
6 | constructor(private snackBar: MatSnackBar) {}
7 |
8 | show(message: string) {
9 | this.snackBar.open(message, '', {
10 | duration: 2000
11 | });
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/shared/models/book.ts:
--------------------------------------------------------------------------------
1 | export class Book {
2 | id: number;
3 | read: boolean;
4 | title: string;
5 | author: string;
6 | description: string;
7 | genre: string;
8 | rating: number;
9 | }
10 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/app/shared/shared.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { MaterialModule } from './material.module';
3 |
4 | @NgModule({
5 | imports: [MaterialModule],
6 | exports: [MaterialModule],
7 | })
8 | export class SharedModule {}
9 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m7/angular-cli-app/src/assets/.gitkeep
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | #
5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6 |
7 | > 0.5%
8 | last 2 versions
9 | Firefox ESR
10 | not dead
11 | not IE 9-11
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m7/angular-cli-app/src/favicon.ico
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 | AngularMaterialApp
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 | import 'hammerjs';
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic()
12 | .bootstrapModule(AppModule)
13 | .catch(err => console.error(err));
14 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/styles.css:
--------------------------------------------------------------------------------
1 | @import '~@angular/material/prebuilt-themes/indigo-pink.css';
2 | @import 'https://fonts.googleapis.com/css?family=Roboto:400,300';
3 |
4 | html,
5 | body {
6 | display: flex;
7 | flex-direction: column;
8 |
9 | font-family: Roboto, Arial, sans-serif;
10 | margin: 0;
11 | height: 100%;
12 | }
13 |
14 | .basic-container {
15 | padding: 30px;
16 | }
17 |
18 | .form-container {
19 | display: flex;
20 | flex-direction: column;
21 | margin-top: 30px;
22 | }
23 |
24 | .form-container > * {
25 | width: 100%;
26 | }
27 |
28 | mat-form-field[hidden] {
29 | display: none;
30 | }
31 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": ["test.ts", "**/*.spec.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/m7/angular-cli-app/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m7/consumerApp/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/m7/consumerApp/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # profiling files
12 | chrome-profiler-events.json
13 | speed-measure-plugin.json
14 |
15 | # IDEs and editors
16 | /.idea
17 | .project
18 | .classpath
19 | .c9/
20 | *.launch
21 | .settings/
22 | *.sublime-workspace
23 |
24 | # IDE - VSCode
25 | .vscode/*
26 | !.vscode/settings.json
27 | !.vscode/tasks.json
28 | !.vscode/launch.json
29 | !.vscode/extensions.json
30 | .history/*
31 |
32 | # misc
33 | /.sass-cache
34 | /connect.lock
35 | /coverage
36 | /libpeerconnection.log
37 | npm-debug.log
38 | yarn-error.log
39 | testem.log
40 | /typings
41 |
42 | # System Files
43 | .DS_Store
44 | Thumbs.db
45 |
--------------------------------------------------------------------------------
/m7/consumerApp/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/m7/consumerApp/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 | import { browser, logging } from 'protractor';
3 |
4 | describe('workspace-project App', () => {
5 | let page: AppPage;
6 |
7 | beforeEach(() => {
8 | page = new AppPage();
9 | });
10 |
11 | it('should display welcome message', () => {
12 | page.navigateTo();
13 | expect(page.getTitleText()).toEqual('Welcome to consumerApp!');
14 | });
15 |
16 | afterEach(async () => {
17 | // Assert that there are no errors emitted from the browser
18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19 | expect(logs).not.toContain(jasmine.objectContaining({
20 | level: logging.Level.SEVERE,
21 | }));
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/m7/consumerApp/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get(browser.baseUrl) as Promise;
6 | }
7 |
8 | getTitleText() {
9 | return element(by.css('app-root h1')).getText() as Promise;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/m7/consumerApp/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/m7/consumerApp/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m7/consumerApp/src/app/app.component.css
--------------------------------------------------------------------------------
/m7/consumerApp/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { AngularConsoleLoggerService } from '@fabiangosebrink/angular-console-logger';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: './app.component.html',
7 | styleUrls: ['./app.component.css'],
8 | })
9 | export class AppComponent {
10 | title = 'consumerApp';
11 |
12 | selectedRating = 5;
13 |
14 | constructor(private logger: AngularConsoleLoggerService) {}
15 |
16 | ratingChanged(rating: number) {
17 | this.selectedRating = rating;
18 | this.logger.info(`${rating} was selected`);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { AngularConsoleLoggerModule } from '@fabiangosebrink/angular-console-logger';
4 | import { AngularRatingModule } from '@fabiangosebrink/angular-rating';
5 | import { environment } from '../environments/environment';
6 | import { AppComponent } from './app.component';
7 |
8 | @NgModule({
9 | declarations: [AppComponent],
10 | imports: [
11 | BrowserModule,
12 | AngularConsoleLoggerModule.forRoot({
13 | appPrefix: 'consumerApp',
14 | isProduction: environment.production,
15 | }),
16 | AngularRatingModule,
17 | ],
18 | providers: [],
19 | bootstrap: [AppComponent],
20 | })
21 | export class AppModule {}
22 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m7/consumerApp/src/assets/.gitkeep
--------------------------------------------------------------------------------
/m7/consumerApp/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | #
5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6 |
7 | > 0.5%
8 | last 2 versions
9 | Firefox ESR
10 | not dead
11 | not IE 9-11
--------------------------------------------------------------------------------
/m7/consumerApp/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m7/consumerApp/src/favicon.ico
--------------------------------------------------------------------------------
/m7/consumerApp/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ConsumerApp
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": [
8 | "test.ts",
9 | "**/*.spec.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/m7/consumerApp/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/m7/consumerApp/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "module": "es2015",
9 | "moduleResolution": "node",
10 | "emitDecoratorMetadata": true,
11 | "experimentalDecorators": true,
12 | "importHelpers": true,
13 | "target": "es5",
14 | "typeRoots": [
15 | "node_modules/@types"
16 | ],
17 | "lib": [
18 | "es2018",
19 | "dom"
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------