├── .github └── pluralsight-background.jpg ├── .gitignore ├── m4 ├── demo1-first-javascript-module │ └── commonjs │ │ ├── main.js │ │ └── printmodule.js ├── demo2-first-typescript-module │ └── typescript │ │ ├── dist │ │ ├── main.js │ │ └── printmodule.js │ │ ├── main.ts │ │ ├── printmodule.ts │ │ └── tsconfig.json ├── demo3-typescript-package │ ├── first-consumer │ │ ├── dist │ │ │ ├── main.d.ts │ │ │ └── main.js │ │ ├── main.ts │ │ ├── package.json │ │ └── tsconfig.json │ └── first-ts-package │ │ ├── dist │ │ ├── calculator-service.d.ts │ │ ├── calculator-service.js │ │ ├── index.d.ts │ │ └── index.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ ├── calculator-service.ts │ │ └── index.ts │ │ └── tsconfig.json └── module-system │ ├── amd │ ├── main.js │ └── printmodule.js │ ├── commonjs │ ├── main.js │ └── printmodule.js │ ├── es6 │ ├── main.js │ └── printmodule.js │ ├── typescript │ ├── dist │ │ ├── main.js │ │ ├── main.js.map │ │ ├── printmodule.js │ │ └── printmodule.js.map │ ├── main.js │ ├── main.ts │ ├── printmodule.js │ ├── printmodule.ts │ └── tsconfig.json │ └── umd │ └── printmodule.js ├── m5 ├── .vscode │ ├── launch.json │ └── tasks.json ├── angular-cli-app │ ├── end │ │ ├── backend │ │ │ └── aspnetcore │ │ │ │ ├── Backend.csproj │ │ │ │ ├── Controllers │ │ │ │ └── BooksController.cs │ │ │ │ ├── Dtos │ │ │ │ ├── BookCreateDto.cs │ │ │ │ ├── BookDto.cs │ │ │ │ └── BookUpdateDto.cs │ │ │ │ ├── Entities │ │ │ │ └── BookEntity.cs │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ └── launchSettings.json │ │ │ │ ├── Repositories │ │ │ │ ├── BookDbContext.cs │ │ │ │ ├── BookRepository.cs │ │ │ │ └── IBookRepository.cs │ │ │ │ ├── Startup.cs │ │ │ │ ├── appsettings.Development.json │ │ │ │ └── appsettings.json │ │ └── frontend │ │ │ ├── .editorconfig │ │ │ ├── angular.json │ │ │ ├── e2e │ │ │ ├── protractor.conf.js │ │ │ ├── src │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── projects │ │ │ ├── angular-console-logger │ │ │ │ ├── karma.conf.js │ │ │ │ ├── ng-package.json │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── angular-console-logger.component.spec.ts │ │ │ │ │ │ ├── angular-console-logger.component.ts │ │ │ │ │ │ ├── angular-console-logger.module.ts │ │ │ │ │ │ ├── angular-console-logger.service.spec.ts │ │ │ │ │ │ ├── angular-console-logger.service.ts │ │ │ │ │ │ └── logger.config.ts │ │ │ │ │ ├── public_api.ts │ │ │ │ │ └── test.ts │ │ │ │ ├── tsconfig.lib.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── tslint.json │ │ │ └── angular-rating │ │ │ │ ├── karma.conf.js │ │ │ │ ├── ng-package.json │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ ├── lib │ │ │ │ │ ├── angular-rating.component.spec.ts │ │ │ │ │ ├── angular-rating.component.ts │ │ │ │ │ ├── angular-rating.module.ts │ │ │ │ │ ├── angular-rating.service.spec.ts │ │ │ │ │ └── angular-rating.service.ts │ │ │ │ ├── public_api.ts │ │ │ │ └── test.ts │ │ │ │ ├── tsconfig.lib.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── tslint.json │ │ │ ├── src │ │ │ ├── app │ │ │ │ ├── app.component.css │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.spec.ts │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.routing.ts │ │ │ │ ├── books │ │ │ │ │ ├── books.module.ts │ │ │ │ │ ├── books.routing.ts │ │ │ │ │ ├── container │ │ │ │ │ │ ├── book-details │ │ │ │ │ │ │ ├── book-details.component.css │ │ │ │ │ │ │ ├── book-details.component.html │ │ │ │ │ │ │ ├── book-details.component.spec.ts │ │ │ │ │ │ │ └── book-details.component.ts │ │ │ │ │ │ ├── book-form │ │ │ │ │ │ │ ├── book-form.component.css │ │ │ │ │ │ │ ├── book-form.component.html │ │ │ │ │ │ │ ├── book-form.component.spec.ts │ │ │ │ │ │ │ └── book-form.component.ts │ │ │ │ │ │ ├── books-overview │ │ │ │ │ │ │ ├── books-overview.component.css │ │ │ │ │ │ │ ├── books-overview.component.html │ │ │ │ │ │ │ ├── books-overview.component.spec.ts │ │ │ │ │ │ │ └── books-overview.component.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── presentational │ │ │ │ │ │ ├── book-list │ │ │ │ │ │ ├── book-list.component.css │ │ │ │ │ │ ├── book-list.component.html │ │ │ │ │ │ ├── book-list.component.spec.ts │ │ │ │ │ │ └── book-list.component.ts │ │ │ │ │ │ └── index.ts │ │ │ │ ├── core │ │ │ │ │ ├── core.module.ts │ │ │ │ │ └── services │ │ │ │ │ │ ├── book.service.ts │ │ │ │ │ │ ├── custom-logger.service.ts │ │ │ │ │ │ ├── http-base.service.ts │ │ │ │ │ │ └── notification.service.ts │ │ │ │ └── shared │ │ │ │ │ ├── material.module.ts │ │ │ │ │ ├── models │ │ │ │ │ └── book.ts │ │ │ │ │ └── shared.module.ts │ │ │ ├── assets │ │ │ │ └── .gitkeep │ │ │ ├── browserslist │ │ │ ├── environments │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ └── start │ │ ├── backend │ │ └── aspnetcore │ │ │ ├── Backend.csproj │ │ │ ├── Controllers │ │ │ └── BooksController.cs │ │ │ ├── Dtos │ │ │ ├── BookCreateDto.cs │ │ │ ├── BookDto.cs │ │ │ └── BookUpdateDto.cs │ │ │ ├── Entities │ │ │ └── BookEntity.cs │ │ │ ├── Program.cs │ │ │ ├── Properties │ │ │ └── launchSettings.json │ │ │ ├── Repositories │ │ │ ├── BookDbContext.cs │ │ │ ├── BookRepository.cs │ │ │ └── IBookRepository.cs │ │ │ ├── Startup.cs │ │ │ ├── appsettings.Development.json │ │ │ └── appsettings.json │ │ └── frontend │ │ ├── .editorconfig │ │ ├── angular.json │ │ ├── e2e │ │ ├── protractor.conf.js │ │ ├── src │ │ │ ├── app.e2e-spec.ts │ │ │ └── app.po.ts │ │ └── tsconfig.e2e.json │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ ├── app │ │ │ ├── app.component.css │ │ │ ├── app.component.html │ │ │ ├── app.component.spec.ts │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── app.routing.ts │ │ │ ├── books │ │ │ │ ├── books.module.ts │ │ │ │ ├── books.routing.ts │ │ │ │ ├── container │ │ │ │ │ ├── book-details │ │ │ │ │ │ ├── book-details.component.css │ │ │ │ │ │ ├── book-details.component.html │ │ │ │ │ │ ├── book-details.component.spec.ts │ │ │ │ │ │ └── book-details.component.ts │ │ │ │ │ ├── book-form │ │ │ │ │ │ ├── book-form.component.css │ │ │ │ │ │ ├── book-form.component.html │ │ │ │ │ │ ├── book-form.component.spec.ts │ │ │ │ │ │ └── book-form.component.ts │ │ │ │ │ ├── books-overview │ │ │ │ │ │ ├── books-overview.component.css │ │ │ │ │ │ ├── books-overview.component.html │ │ │ │ │ │ ├── books-overview.component.spec.ts │ │ │ │ │ │ └── books-overview.component.ts │ │ │ │ │ └── index.ts │ │ │ │ └── presentational │ │ │ │ │ ├── book-list │ │ │ │ │ ├── book-list.component.css │ │ │ │ │ ├── book-list.component.html │ │ │ │ │ ├── book-list.component.spec.ts │ │ │ │ │ └── book-list.component.ts │ │ │ │ │ └── index.ts │ │ │ ├── core │ │ │ │ ├── core.module.ts │ │ │ │ └── services │ │ │ │ │ ├── book.service.ts │ │ │ │ │ ├── http-base.service.ts │ │ │ │ │ ├── logging.service.ts │ │ │ │ │ └── notification.service.ts │ │ │ └── shared │ │ │ │ ├── material.module.ts │ │ │ │ ├── models │ │ │ │ └── book.ts │ │ │ │ └── shared.module.ts │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── browserslist │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── karma.conf.js │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.css │ │ ├── test.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ └── tslint.json │ │ ├── tsconfig.json │ │ └── tslint.json └── ng-packagr-demo │ ├── .editorconfig │ ├── .gitignore │ ├── README.md │ ├── angular.json │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── super-lib │ ├── dist │ │ ├── README.md │ │ ├── bundles │ │ │ ├── my-first-super-lib.umd.js │ │ │ ├── my-first-super-lib.umd.js.map │ │ │ ├── my-first-super-lib.umd.min.js │ │ │ └── my-first-super-lib.umd.min.js.map │ │ ├── esm2015 │ │ │ ├── my-first-super-lib.js │ │ │ ├── public_api.js │ │ │ └── src │ │ │ │ ├── super-lib.component.js │ │ │ │ └── super-lib.module.js │ │ ├── esm5 │ │ │ ├── my-first-super-lib.js │ │ │ ├── public_api.js │ │ │ └── src │ │ │ │ ├── super-lib.component.js │ │ │ │ └── super-lib.module.js │ │ ├── fesm2015 │ │ │ ├── my-first-super-lib.js │ │ │ └── my-first-super-lib.js.map │ │ ├── fesm5 │ │ │ ├── my-first-super-lib.js │ │ │ └── my-first-super-lib.js.map │ │ ├── my-first-super-lib.d.ts │ │ ├── my-first-super-lib.metadata.json │ │ ├── package.json │ │ ├── public_api.d.ts │ │ └── src │ │ │ ├── super-lib.component.d.ts │ │ │ └── super-lib.module.d.ts │ ├── package.json │ ├── public_api.ts │ ├── readme.md │ └── src │ │ ├── super-lib.component.html │ │ ├── super-lib.component.ts │ │ └── super-lib.module.ts │ ├── tsconfig.json │ └── tslint.json ├── m6 ├── angular-cli-app │ ├── .editorconfig │ ├── angular.json │ ├── dist │ │ ├── angular-console-logger │ │ │ ├── angular-console-logger-0.0.1.tgz │ │ │ ├── angular-console-logger.d.ts │ │ │ ├── angular-console-logger.metadata.json │ │ │ ├── bundles │ │ │ │ ├── angular-console-logger.umd.js │ │ │ │ ├── angular-console-logger.umd.js.map │ │ │ │ ├── angular-console-logger.umd.min.js │ │ │ │ └── angular-console-logger.umd.min.js.map │ │ │ ├── esm2015 │ │ │ │ ├── angular-console-logger.js │ │ │ │ ├── lib │ │ │ │ │ ├── angular-console-logger.component.js │ │ │ │ │ ├── angular-console-logger.module.js │ │ │ │ │ ├── angular-console-logger.service.js │ │ │ │ │ └── logger.config.js │ │ │ │ └── public_api.js │ │ │ ├── esm5 │ │ │ │ ├── angular-console-logger.js │ │ │ │ ├── lib │ │ │ │ │ ├── angular-console-logger.component.js │ │ │ │ │ ├── angular-console-logger.module.js │ │ │ │ │ ├── angular-console-logger.service.js │ │ │ │ │ └── logger.config.js │ │ │ │ └── public_api.js │ │ │ ├── fesm2015 │ │ │ │ ├── angular-console-logger.js │ │ │ │ └── angular-console-logger.js.map │ │ │ ├── fesm5 │ │ │ │ ├── angular-console-logger.js │ │ │ │ └── angular-console-logger.js.map │ │ │ ├── lib │ │ │ │ ├── angular-console-logger.component.d.ts │ │ │ │ ├── angular-console-logger.module.d.ts │ │ │ │ ├── angular-console-logger.service.d.ts │ │ │ │ └── logger.config.d.ts │ │ │ ├── node_modules │ │ │ │ └── tslib │ │ │ │ │ ├── .gitattributes │ │ │ │ │ ├── CopyrightNotice.txt │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── README.md │ │ │ │ │ ├── bower.json │ │ │ │ │ ├── docs │ │ │ │ │ └── generator.md │ │ │ │ │ ├── package.json │ │ │ │ │ ├── tslib.d.ts │ │ │ │ │ ├── tslib.es6.html │ │ │ │ │ ├── tslib.es6.js │ │ │ │ │ ├── tslib.html │ │ │ │ │ └── tslib.js │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ └── public_api.d.ts │ │ └── angular-rating │ │ │ ├── angular-rating-0.0.1.tgz │ │ │ ├── angular-rating.d.ts │ │ │ ├── angular-rating.metadata.json │ │ │ ├── bundles │ │ │ ├── angular-rating.umd.js │ │ │ ├── angular-rating.umd.js.map │ │ │ ├── angular-rating.umd.min.js │ │ │ └── angular-rating.umd.min.js.map │ │ │ ├── esm2015 │ │ │ ├── angular-rating.js │ │ │ ├── lib │ │ │ │ ├── angular-rating.component.js │ │ │ │ ├── angular-rating.module.js │ │ │ │ └── angular-rating.service.js │ │ │ └── public_api.js │ │ │ ├── esm5 │ │ │ ├── angular-rating.js │ │ │ ├── lib │ │ │ │ ├── angular-rating.component.js │ │ │ │ ├── angular-rating.module.js │ │ │ │ └── angular-rating.service.js │ │ │ └── public_api.js │ │ │ ├── fesm2015 │ │ │ ├── angular-rating.js │ │ │ └── angular-rating.js.map │ │ │ ├── fesm5 │ │ │ ├── angular-rating.js │ │ │ └── angular-rating.js.map │ │ │ ├── lib │ │ │ ├── angular-rating.component.d.ts │ │ │ ├── angular-rating.module.d.ts │ │ │ └── angular-rating.service.d.ts │ │ │ ├── node_modules │ │ │ └── tslib │ │ │ │ ├── .gitattributes │ │ │ │ ├── CopyrightNotice.txt │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── README.md │ │ │ │ ├── bower.json │ │ │ │ ├── docs │ │ │ │ └── generator.md │ │ │ │ ├── package.json │ │ │ │ ├── tslib.d.ts │ │ │ │ ├── tslib.es6.html │ │ │ │ ├── tslib.es6.js │ │ │ │ ├── tslib.html │ │ │ │ └── tslib.js │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ └── public_api.d.ts │ ├── e2e │ │ ├── protractor.conf.js │ │ ├── src │ │ │ ├── app.e2e-spec.ts │ │ │ └── app.po.ts │ │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── projects │ │ ├── angular-console-logger │ │ │ ├── karma.conf.js │ │ │ ├── ng-package.json │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── lib │ │ │ │ │ ├── angular-console-logger.component.spec.ts │ │ │ │ │ ├── angular-console-logger.component.ts │ │ │ │ │ ├── angular-console-logger.module.ts │ │ │ │ │ ├── angular-console-logger.service.spec.ts │ │ │ │ │ ├── angular-console-logger.service.ts │ │ │ │ │ └── logger.config.ts │ │ │ │ ├── public_api.ts │ │ │ │ └── test.ts │ │ │ ├── tsconfig.lib.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ └── angular-rating │ │ │ ├── karma.conf.js │ │ │ ├── ng-package.json │ │ │ ├── package.json │ │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── angular-rating.component.spec.ts │ │ │ │ ├── angular-rating.component.ts │ │ │ │ ├── angular-rating.module.ts │ │ │ │ ├── angular-rating.service.spec.ts │ │ │ │ └── angular-rating.service.ts │ │ │ ├── public_api.ts │ │ │ └── test.ts │ │ │ ├── tsconfig.lib.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ ├── src │ │ ├── app │ │ │ ├── app.component.css │ │ │ ├── app.component.html │ │ │ ├── app.component.spec.ts │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── app.routing.ts │ │ │ ├── books │ │ │ │ ├── books.module.ts │ │ │ │ ├── books.routing.ts │ │ │ │ ├── container │ │ │ │ │ ├── book-details │ │ │ │ │ │ ├── book-details.component.css │ │ │ │ │ │ ├── book-details.component.html │ │ │ │ │ │ ├── book-details.component.spec.ts │ │ │ │ │ │ └── book-details.component.ts │ │ │ │ │ ├── book-form │ │ │ │ │ │ ├── book-form.component.css │ │ │ │ │ │ ├── book-form.component.html │ │ │ │ │ │ ├── book-form.component.spec.ts │ │ │ │ │ │ └── book-form.component.ts │ │ │ │ │ ├── books-overview │ │ │ │ │ │ ├── books-overview.component.css │ │ │ │ │ │ ├── books-overview.component.html │ │ │ │ │ │ ├── books-overview.component.spec.ts │ │ │ │ │ │ └── books-overview.component.ts │ │ │ │ │ └── index.ts │ │ │ │ └── presentational │ │ │ │ │ ├── book-list │ │ │ │ │ ├── book-list.component.css │ │ │ │ │ ├── book-list.component.html │ │ │ │ │ ├── book-list.component.spec.ts │ │ │ │ │ └── book-list.component.ts │ │ │ │ │ └── index.ts │ │ │ ├── core │ │ │ │ ├── core.module.ts │ │ │ │ └── services │ │ │ │ │ ├── book.service.ts │ │ │ │ │ ├── custom-logger.service.ts │ │ │ │ │ ├── http-base.service.ts │ │ │ │ │ └── notification.service.ts │ │ │ └── shared │ │ │ │ ├── material.module.ts │ │ │ │ ├── models │ │ │ │ └── book.ts │ │ │ │ └── shared.module.ts │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── browserslist │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── karma.conf.js │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.css │ │ ├── test.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json └── consumerApp │ ├── .editorconfig │ ├── .gitignore │ ├── README.md │ ├── angular.json │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── m7 ├── .gitkeep ├── angular-cli-app │ ├── .editorconfig │ ├── angular.json │ ├── dist │ │ ├── angular-console-logger │ │ │ ├── README.md │ │ │ ├── bundles │ │ │ │ ├── fabiangosebrink-angular-console-logger.umd.js │ │ │ │ ├── fabiangosebrink-angular-console-logger.umd.js.map │ │ │ │ ├── fabiangosebrink-angular-console-logger.umd.min.js │ │ │ │ └── fabiangosebrink-angular-console-logger.umd.min.js.map │ │ │ ├── esm2015 │ │ │ │ ├── fabiangosebrink-angular-console-logger.js │ │ │ │ ├── lib │ │ │ │ │ ├── angular-console-logger.component.js │ │ │ │ │ ├── angular-console-logger.module.js │ │ │ │ │ ├── angular-console-logger.service.js │ │ │ │ │ └── logger.config.js │ │ │ │ └── public_api.js │ │ │ ├── esm5 │ │ │ │ ├── fabiangosebrink-angular-console-logger.js │ │ │ │ ├── lib │ │ │ │ │ ├── angular-console-logger.component.js │ │ │ │ │ ├── angular-console-logger.module.js │ │ │ │ │ ├── angular-console-logger.service.js │ │ │ │ │ └── logger.config.js │ │ │ │ └── public_api.js │ │ │ ├── fabiangosebrink-angular-console-logger.d.ts │ │ │ ├── fabiangosebrink-angular-console-logger.metadata.json │ │ │ ├── fesm2015 │ │ │ │ ├── fabiangosebrink-angular-console-logger.js │ │ │ │ └── fabiangosebrink-angular-console-logger.js.map │ │ │ ├── fesm5 │ │ │ │ ├── fabiangosebrink-angular-console-logger.js │ │ │ │ └── fabiangosebrink-angular-console-logger.js.map │ │ │ ├── lib │ │ │ │ ├── angular-console-logger.component.d.ts │ │ │ │ ├── angular-console-logger.module.d.ts │ │ │ │ ├── angular-console-logger.service.d.ts │ │ │ │ └── logger.config.d.ts │ │ │ ├── package.json │ │ │ └── public_api.d.ts │ │ └── angular-rating │ │ │ ├── README.md │ │ │ ├── bundles │ │ │ ├── fabiangosebrink-angular-rating.umd.js │ │ │ ├── fabiangosebrink-angular-rating.umd.js.map │ │ │ ├── fabiangosebrink-angular-rating.umd.min.js │ │ │ └── fabiangosebrink-angular-rating.umd.min.js.map │ │ │ ├── esm2015 │ │ │ ├── fabiangosebrink-angular-rating.js │ │ │ ├── lib │ │ │ │ ├── angular-rating.component.js │ │ │ │ ├── angular-rating.module.js │ │ │ │ └── angular-rating.service.js │ │ │ └── public_api.js │ │ │ ├── esm5 │ │ │ ├── fabiangosebrink-angular-rating.js │ │ │ ├── lib │ │ │ │ ├── angular-rating.component.js │ │ │ │ ├── angular-rating.module.js │ │ │ │ └── angular-rating.service.js │ │ │ └── public_api.js │ │ │ ├── fabiangosebrink-angular-rating.d.ts │ │ │ ├── fabiangosebrink-angular-rating.metadata.json │ │ │ ├── fesm2015 │ │ │ ├── fabiangosebrink-angular-rating.js │ │ │ └── fabiangosebrink-angular-rating.js.map │ │ │ ├── fesm5 │ │ │ ├── fabiangosebrink-angular-rating.js │ │ │ └── fabiangosebrink-angular-rating.js.map │ │ │ ├── lib │ │ │ ├── angular-rating.component.d.ts │ │ │ ├── angular-rating.module.d.ts │ │ │ └── angular-rating.service.d.ts │ │ │ ├── package.json │ │ │ └── public_api.d.ts │ ├── e2e │ │ ├── protractor.conf.js │ │ ├── src │ │ │ ├── app.e2e-spec.ts │ │ │ └── app.po.ts │ │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── projects │ │ ├── angular-console-logger │ │ │ ├── karma.conf.js │ │ │ ├── ng-package.json │ │ │ ├── package.json │ │ │ ├── readme.md │ │ │ ├── src │ │ │ │ ├── lib │ │ │ │ │ ├── angular-console-logger.component.spec.ts │ │ │ │ │ ├── angular-console-logger.component.ts │ │ │ │ │ ├── angular-console-logger.module.ts │ │ │ │ │ ├── angular-console-logger.service.spec.ts │ │ │ │ │ ├── angular-console-logger.service.ts │ │ │ │ │ └── logger.config.ts │ │ │ │ ├── public_api.ts │ │ │ │ └── test.ts │ │ │ ├── tsconfig.lib.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ └── angular-rating │ │ │ ├── karma.conf.js │ │ │ ├── ng-package.json │ │ │ ├── package.json │ │ │ ├── readme.md │ │ │ ├── src │ │ │ ├── lib │ │ │ │ ├── angular-rating.component.spec.ts │ │ │ │ ├── angular-rating.component.ts │ │ │ │ ├── angular-rating.module.ts │ │ │ │ ├── angular-rating.service.spec.ts │ │ │ │ └── angular-rating.service.ts │ │ │ ├── public_api.ts │ │ │ └── test.ts │ │ │ ├── tsconfig.lib.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ ├── src │ │ ├── app │ │ │ ├── app.component.css │ │ │ ├── app.component.html │ │ │ ├── app.component.spec.ts │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── app.routing.ts │ │ │ ├── books │ │ │ │ ├── books.module.ts │ │ │ │ ├── books.routing.ts │ │ │ │ ├── container │ │ │ │ │ ├── book-details │ │ │ │ │ │ ├── book-details.component.css │ │ │ │ │ │ ├── book-details.component.html │ │ │ │ │ │ ├── book-details.component.spec.ts │ │ │ │ │ │ └── book-details.component.ts │ │ │ │ │ ├── book-form │ │ │ │ │ │ ├── book-form.component.css │ │ │ │ │ │ ├── book-form.component.html │ │ │ │ │ │ ├── book-form.component.spec.ts │ │ │ │ │ │ └── book-form.component.ts │ │ │ │ │ ├── books-overview │ │ │ │ │ │ ├── books-overview.component.css │ │ │ │ │ │ ├── books-overview.component.html │ │ │ │ │ │ ├── books-overview.component.spec.ts │ │ │ │ │ │ └── books-overview.component.ts │ │ │ │ │ └── index.ts │ │ │ │ └── presentational │ │ │ │ │ ├── book-list │ │ │ │ │ ├── book-list.component.css │ │ │ │ │ ├── book-list.component.html │ │ │ │ │ ├── book-list.component.spec.ts │ │ │ │ │ └── book-list.component.ts │ │ │ │ │ └── index.ts │ │ │ ├── core │ │ │ │ ├── core.module.ts │ │ │ │ └── services │ │ │ │ │ ├── book.service.ts │ │ │ │ │ ├── custom-logger.service.ts │ │ │ │ │ ├── http-base.service.ts │ │ │ │ │ └── notification.service.ts │ │ │ └── shared │ │ │ │ ├── material.module.ts │ │ │ │ ├── models │ │ │ │ └── book.ts │ │ │ │ └── shared.module.ts │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── browserslist │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── karma.conf.js │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.css │ │ ├── test.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json └── consumerApp │ ├── .editorconfig │ ├── .gitignore │ ├── README.md │ ├── angular.json │ ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── browserslist │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json └── readme.md /.github/pluralsight-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/.github/pluralsight-background.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /m4/first-consumer/dist 2 | /m4/first-ts-package/dist 3 | /m4/first-ts-package/*.tgz 4 | /m5/**/backend/aspnetcore/obj/ 5 | /m5/**/backend/aspnetcore/bin/ 6 | /m5/**/frontend/node_modules/ 7 | /m5/**/end/frontend/dist/ 8 | /m4/demo3-typescript-package/first-consumer/node_modules/ 9 | -------------------------------------------------------------------------------- /m4/demo1-first-javascript-module/commonjs/main.js: -------------------------------------------------------------------------------- 1 | var firstModule = require('./printmodule.js'); 2 | 3 | firstModule.printMessage('hello module'); 4 | -------------------------------------------------------------------------------- /m4/demo1-first-javascript-module/commonjs/printmodule.js: -------------------------------------------------------------------------------- 1 | var myModule = { 2 | printMessage: function printMessage(message) { 3 | console.log(message); 4 | }, 5 | }; 6 | 7 | module.exports = myModule; 8 | -------------------------------------------------------------------------------- /m4/demo2-first-typescript-module/typescript/dist/main.js: -------------------------------------------------------------------------------- 1 | define(["require", "exports", "./printmodule"], function (require, exports, printmodule_1) { 2 | "use strict"; 3 | Object.defineProperty(exports, "__esModule", { value: true }); 4 | var printModule = new printmodule_1.PrintModule(); 5 | printModule.printMessage('hello world'); 6 | }); 7 | -------------------------------------------------------------------------------- /m4/demo2-first-typescript-module/typescript/dist/printmodule.js: -------------------------------------------------------------------------------- 1 | define(["require", "exports"], function (require, exports) { 2 | "use strict"; 3 | Object.defineProperty(exports, "__esModule", { value: true }); 4 | var PrintModule = /** @class */ (function () { 5 | function PrintModule() { 6 | } 7 | PrintModule.prototype.printMessage = function (message) { 8 | console.log(message); 9 | }; 10 | return PrintModule; 11 | }()); 12 | exports.PrintModule = PrintModule; 13 | }); 14 | -------------------------------------------------------------------------------- /m4/demo2-first-typescript-module/typescript/main.ts: -------------------------------------------------------------------------------- 1 | import { PrintModule } from './printmodule'; 2 | 3 | const printModule = new PrintModule(); 4 | printModule.printMessage('hello world'); 5 | -------------------------------------------------------------------------------- /m4/demo2-first-typescript-module/typescript/printmodule.ts: -------------------------------------------------------------------------------- 1 | export class PrintModule { 2 | printMessage(message) { 3 | console.log(message); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /m4/demo2-first-typescript-module/typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./dist/", 4 | "module": "commonjs", // let is be xx modules 5 | "target": "es5" // created modules should be in the xx syntax 6 | }, 7 | "include": ["./"] 8 | } 9 | 10 | // { 11 | // "compilerOptions": { 12 | // "outDir": "./dist/", 13 | // "module": "commonjs", // let is be xx modules 14 | // "target": "es6" // created modules should be in the xx syntax 15 | // }, 16 | // "include": ["./"] 17 | // } 18 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-consumer/dist/main.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-consumer/dist/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | var my_first_library_1 = require("my-first-library"); 4 | var result = my_first_library_1.CalculatorService.add(3, 4, 5); 5 | console.log(result); 6 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-consumer/main.ts: -------------------------------------------------------------------------------- 1 | import { CalculatorService } from 'my-first-library'; 2 | 3 | let result = CalculatorService.add(3, 4, 5); 4 | console.log(result); 5 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-consumer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "first-consumer", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "tsc && cd dist && node main.js" 9 | }, 10 | "author": "Fabian Gosebrink", 11 | "license": "ISC" 12 | } 13 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-consumer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "declaration": true, 6 | "outDir": "./dist" 7 | }, 8 | "include": ["**/*"] 9 | } 10 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-ts-package/dist/calculator-service.d.ts: -------------------------------------------------------------------------------- 1 | export declare namespace CalculatorService { 2 | function add(...numbers: number[]): number; 3 | function substract(a: number, b: number): number; 4 | function multiply(a: number, b: number): number; 5 | } 6 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-ts-package/dist/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './calculator-service'; 2 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-ts-package/dist/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function __export(m) { 3 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; 4 | } 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | __export(require("./calculator-service")); 7 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-ts-package/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-first-library", 3 | "version": "0.0.1", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-ts-package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-first-library", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "build": "tsc" 6 | }, 7 | "description": "", 8 | "main": "dist/index.js", 9 | "types": "dist/index.d.ts" 10 | } 11 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-ts-package/src/calculator-service.ts: -------------------------------------------------------------------------------- 1 | export namespace CalculatorService { 2 | export function add(...numbers: number[]): number { 3 | let sum = 0; 4 | numbers.forEach(number => (sum += number)); 5 | return sum; 6 | } 7 | 8 | export function substract(a: number, b: number): number { 9 | return a - b; 10 | } 11 | 12 | export function multiply(a: number, b: number): number { 13 | return a * b; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-ts-package/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './calculator-service'; 2 | 3 | -------------------------------------------------------------------------------- /m4/demo3-typescript-package/first-ts-package/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "declaration": true, 6 | "outDir": "./dist" 7 | }, 8 | "include": ["src/**/*"] 9 | } 10 | -------------------------------------------------------------------------------- /m4/module-system/amd/main.js: -------------------------------------------------------------------------------- 1 | require(['./printmodule'], function(printModule) { 2 | printModule.printMessage('Hello Amd'); 3 | }); 4 | -------------------------------------------------------------------------------- /m4/module-system/amd/printmodule.js: -------------------------------------------------------------------------------- 1 | define(['printmodule'], function() { 2 | return { 3 | printMessage: function(message) { 4 | console.log(message); 5 | }, 6 | }; 7 | }); 8 | -------------------------------------------------------------------------------- /m4/module-system/commonjs/main.js: -------------------------------------------------------------------------------- 1 | var firstModule = require('./printmodule.js'); 2 | 3 | firstModule.printMessage('hello module'); 4 | -------------------------------------------------------------------------------- /m4/module-system/commonjs/printmodule.js: -------------------------------------------------------------------------------- 1 | var myModule = { 2 | printMessage: function printMessage(message) { 3 | console.log(message); 4 | }, 5 | }; 6 | 7 | module.exports = myModule; 8 | -------------------------------------------------------------------------------- /m4/module-system/es6/main.js: -------------------------------------------------------------------------------- 1 | import { printMessage } from './printmodule.js'; 2 | printMessage('this is my message'); 3 | -------------------------------------------------------------------------------- /m4/module-system/es6/printmodule.js: -------------------------------------------------------------------------------- 1 | export function printMessage(message) { 2 | console.log(message); 3 | } 4 | -------------------------------------------------------------------------------- /m4/module-system/typescript/dist/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | var printmodule_1 = require("./printmodule"); 4 | var printModule = new printmodule_1.PrintModule(); 5 | printModule.printMessage('hello world'); 6 | -------------------------------------------------------------------------------- /m4/module-system/typescript/dist/main.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"main.js","sourceRoot":"","sources":["../main.ts"],"names":[],"mappings":";;AAAA,6CAA4C;AAE5C,IAAM,WAAW,GAAG,IAAI,yBAAW,EAAE,CAAC;AACtC,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC"} -------------------------------------------------------------------------------- /m4/module-system/typescript/dist/printmodule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | var PrintModule = /** @class */ (function () { 4 | function PrintModule() { 5 | } 6 | PrintModule.prototype.printMessage = function (message) { 7 | console.log(message); 8 | }; 9 | return PrintModule; 10 | }()); 11 | exports.PrintModule = PrintModule; 12 | -------------------------------------------------------------------------------- /m4/module-system/typescript/dist/printmodule.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"printmodule.js","sourceRoot":"","sources":["../printmodule.ts"],"names":[],"mappings":";;AAAA;IAAA;IAIA,CAAC;IAHG,kCAAY,GAAZ,UAAa,OAAO;QAChB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IACL,kBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,kCAAW"} -------------------------------------------------------------------------------- /m4/module-system/typescript/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | exports.__esModule = true; 3 | var printmodule_1 = require("./printmodule"); 4 | var printModule = new printmodule_1.PrintModule(); 5 | printModule.printMessage('hello world'); 6 | -------------------------------------------------------------------------------- /m4/module-system/typescript/main.ts: -------------------------------------------------------------------------------- 1 | import { PrintModule } from './printmodule'; 2 | 3 | const printModule = new PrintModule(); 4 | printModule.printMessage('hello world'); 5 | -------------------------------------------------------------------------------- /m4/module-system/typescript/printmodule.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | exports.__esModule = true; 3 | var PrintModule = /** @class */ (function () { 4 | function PrintModule() { 5 | } 6 | PrintModule.prototype.printMessage = function (message) { 7 | console.log(message); 8 | }; 9 | return PrintModule; 10 | }()); 11 | exports.PrintModule = PrintModule; 12 | -------------------------------------------------------------------------------- /m4/module-system/typescript/printmodule.ts: -------------------------------------------------------------------------------- 1 | export class PrintModule { 2 | printMessage(message) { 3 | console.log(message); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /m4/module-system/typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./dist/", 4 | "module": "commonjs", // let is be xx modules 5 | "target": "es5" // created modules should be in the xx syntax 6 | }, 7 | "include": ["./"] 8 | } 9 | 10 | // { 11 | // "compilerOptions": { 12 | // "outDir": "./dist/", 13 | // "module": "commonjs", // let is be xx modules 14 | // "target": "es6" // created modules should be in the xx syntax 15 | // }, 16 | // "include": ["./"] 17 | // } 18 | -------------------------------------------------------------------------------- /m4/module-system/umd/printmodule.js: -------------------------------------------------------------------------------- 1 | (function(root, factory) { 2 | if (typeof define === 'function' && define.amd) { 3 | // define AMD 4 | define(['printmodule'], factory); 5 | } else if (typeof exports === 'object') { 6 | // define CommonJS 7 | module.exports = factory(require('printmodule')); 8 | } else { 9 | root.returnExports = factory(root.printmodule); 10 | } 11 | })(this, function(printmodule) { 12 | // define module methods 13 | function printMessage(message) { 14 | console.log(message); 15 | } 16 | 17 | return { printMessage: printMessage }; 18 | }); 19 | -------------------------------------------------------------------------------- /m5/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/backend/aspnetcore/Backend.csproj" 11 | ], 12 | "problemMatcher": "$msCompile" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/Backend.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/Dtos/BookCreateDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Backend.Dtos 8 | { 9 | public class BookCreateDto 10 | { 11 | 12 | public bool Read { get; set; } 13 | 14 | [Required] 15 | public string Title { get; set; } 16 | public string Author { get; set; } 17 | public string Description { get; set; } 18 | public string Genre { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/Dtos/BookDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Backend.Dtos 4 | { 5 | public class BookDto 6 | { 7 | public int Id { get; set; } 8 | public bool Read { get; set; } 9 | public string Title { get; set; } 10 | public string Author { get; set; } 11 | public string Description { get; set; } 12 | public string Genre { get; set; } 13 | public int Rating { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/Dtos/BookUpdateDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Backend.Dtos 7 | { 8 | public class BookUpdateDto 9 | { 10 | public bool Read { get; set; } 11 | public string Title { get; set; } 12 | public string Author { get; set; } 13 | public string Description { get; set; } 14 | public string Genre { get; set; } 15 | public int Rating { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/Entities/BookEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Backend.Entities 4 | { 5 | public class Book 6 | { 7 | public int Id { get; set; } 8 | public bool Read { get; set; } 9 | public string Title { get; set; } 10 | public string Author { get; set; } 11 | public string Description { get; set; } 12 | public string Genre { get; set; } 13 | public int Rating { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Backend.Repositories; 3 | using Microsoft.AspNetCore; 4 | using Microsoft.AspNetCore.Hosting; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using Microsoft.Extensions.Logging; 7 | 8 | namespace Backend 9 | { 10 | public class Program 11 | { 12 | public static void Main(string[] args) 13 | { 14 | CreateWebHostBuilder(args).Build().Run(); 15 | } 16 | 17 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 18 | WebHost.CreateDefaultBuilder(args) 19 | .UseStartup(); 20 | } 21 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/Repositories/BookDbContext.cs: -------------------------------------------------------------------------------- 1 | using Backend.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace Backend.Repositories 5 | { 6 | public class BookDbContext : DbContext 7 | { 8 | public BookDbContext(DbContextOptions options) : base(options) 9 | { 10 | 11 | } 12 | 13 | public DbSet Books { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/Repositories/IBookRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using Backend.Entities; 6 | 7 | namespace Backend.Repositories 8 | { 9 | public interface IBookRepository 10 | { 11 | Book GetSingle(int id); 12 | void Add(Book item); 13 | void Delete(int id); 14 | Book Update(int id, Book item); 15 | IQueryable GetAll(bool? read); 16 | int Count(Expression> predicate = null); 17 | 18 | bool Save(); 19 | } 20 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/backend/aspnetcore/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/.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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | }; -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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/angular-cli-app/end/frontend/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 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/projects/angular-console-logger/src/lib/angular-console-logger.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { AngularConsoleLoggerService } from './angular-console-logger.service'; 4 | 5 | describe('AngularConsoleLoggerService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: AngularConsoleLoggerService = TestBed.get(AngularConsoleLoggerService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/projects/angular-console-logger/src/lib/logger.config.ts: -------------------------------------------------------------------------------- 1 | export class LoggerConfig { 2 | isProduction: boolean; 3 | appPrefix: string; 4 | } 5 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/projects/angular-rating/src/lib/angular-rating.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AngularRatingComponent } from './angular-rating.component'; 4 | 5 | describe('AngularRatingComponent', () => { 6 | let component: AngularRatingComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AngularRatingComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AngularRatingComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/src/app/books/container/book-form/book-form.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/angular-cli-app/end/frontend/src/app/books/container/book-form/book-form.component.css -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/src/app/books/container/books-overview/books-overview.component.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 24 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/src/app/books/presentational/index.ts: -------------------------------------------------------------------------------- 1 | import { BookListComponent } from './book-list/book-list.component'; 2 | 3 | export const allPresentationalComponents = [BookListComponent]; 4 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/angular-cli-app/end/frontend/src/assets/.gitkeep -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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/angular-cli-app/end/frontend/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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/angular-cli-app/end/frontend/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/angular-cli-app/end/frontend/src/favicon.ico -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | AngularMaterialApp 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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/angular-cli-app/end/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/end/frontend/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/angular-cli-app/end/frontend/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/angular-cli-app/start/backend/aspnetcore/Backend.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/Dtos/BookCreateDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Backend.Dtos 8 | { 9 | public class BookCreateDto 10 | { 11 | 12 | public bool Read { get; set; } 13 | 14 | [Required] 15 | public string Title { get; set; } 16 | public string Author { get; set; } 17 | public string Description { get; set; } 18 | public string Genre { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/Dtos/BookDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Backend.Dtos 4 | { 5 | public class BookDto 6 | { 7 | public int Id { get; set; } 8 | public bool Read { get; set; } 9 | public string Title { get; set; } 10 | public string Author { get; set; } 11 | public string Description { get; set; } 12 | public string Genre { get; set; } 13 | public int Rating { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/Dtos/BookUpdateDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Backend.Dtos 7 | { 8 | public class BookUpdateDto 9 | { 10 | public bool Read { get; set; } 11 | public string Title { get; set; } 12 | public string Author { get; set; } 13 | public string Description { get; set; } 14 | public string Genre { get; set; } 15 | public int Rating { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/Entities/BookEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Backend.Entities 4 | { 5 | public class Book 6 | { 7 | public int Id { get; set; } 8 | public bool Read { get; set; } 9 | public string Title { get; set; } 10 | public string Author { get; set; } 11 | public string Description { get; set; } 12 | public string Genre { get; set; } 13 | public int Rating { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Backend.Repositories; 3 | using Microsoft.AspNetCore; 4 | using Microsoft.AspNetCore.Hosting; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using Microsoft.Extensions.Logging; 7 | 8 | namespace Backend 9 | { 10 | public class Program 11 | { 12 | public static void Main(string[] args) 13 | { 14 | CreateWebHostBuilder(args).Build().Run(); 15 | } 16 | 17 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 18 | WebHost.CreateDefaultBuilder(args) 19 | .UseStartup(); 20 | } 21 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/Repositories/BookDbContext.cs: -------------------------------------------------------------------------------- 1 | using Backend.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace Backend.Repositories 5 | { 6 | public class BookDbContext : DbContext 7 | { 8 | public BookDbContext(DbContextOptions options) : base(options) 9 | { 10 | 11 | } 12 | 13 | public DbSet Books { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/Repositories/IBookRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using Backend.Entities; 6 | 7 | namespace Backend.Repositories 8 | { 9 | public interface IBookRepository 10 | { 11 | Book GetSingle(int id); 12 | void Add(Book item); 13 | void Delete(int id); 14 | Book Update(int id, Book item); 15 | IQueryable GetAll(bool? read); 16 | int Count(Expression> predicate = null); 17 | 18 | bool Save(); 19 | } 20 | } -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/backend/aspnetcore/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/.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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | }; -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/app/books/books.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { HttpClientModule } from '@angular/common/http'; 3 | import { NgModule } from '@angular/core'; 4 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 5 | import { RouterModule } from '@angular/router'; 6 | import { SharedModule } from '../shared/shared.module'; 7 | import { BooksRoutes } from './books.routing'; 8 | import { allContainerComponents } from './container'; 9 | import { allPresentationalComponents } from './presentational'; 10 | 11 | @NgModule({ 12 | imports: [ 13 | HttpClientModule, 14 | CommonModule, 15 | SharedModule, 16 | ReactiveFormsModule, 17 | FormsModule, 18 | RouterModule.forChild(BooksRoutes), 19 | ], 20 | declarations: [...allContainerComponents, ...allPresentationalComponents], 21 | }) 22 | export class BooksModule {} 23 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/app/books/container/book-form/book-form.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/angular-cli-app/start/frontend/src/app/books/container/book-form/book-form.component.css -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/app/books/container/books-overview/books-overview.component.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 24 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | 9 | .rated { 10 | color: orange; 11 | } 12 | 13 | .rating-wrapper { 14 | cursor: pointer; 15 | } 16 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/app/books/presentational/book-list/book-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; 2 | import { Book } from '@app/shared/models/book'; 3 | 4 | @Component({ 5 | selector: 'app-book-list', 6 | templateUrl: './book-list.component.html', 7 | styleUrls: ['./book-list.component.css'], 8 | }) 9 | export class BookListComponent implements OnInit { 10 | @Input() books: Book[] = []; 11 | 12 | @Output() bookChanged = new EventEmitter(); 13 | 14 | options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; 15 | 16 | ngOnInit() {} 17 | 18 | toggleBookRead(book: Book) { 19 | book.read = !book.read; 20 | this.bookChanged.emit(book); 21 | } 22 | 23 | changeRating(rating: number, book: Book) { 24 | book.rating = rating; 25 | this.bookChanged.emit(book); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/app/books/presentational/index.ts: -------------------------------------------------------------------------------- 1 | import { BookListComponent } from './book-list/book-list.component'; 2 | 3 | export const allPresentationalComponents = [BookListComponent]; 4 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/app/core/core.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | @NgModule({ 4 | providers: [], 5 | }) 6 | export class CoreModule {} 7 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/app/core/services/logging.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable({ providedIn: 'root' }) 4 | export class LoggingService { 5 | warn(message: string) { 6 | console.warn('custom warn:' + message); 7 | } 8 | error(message: string) { 9 | console.error('custom error:' + message); 10 | } 11 | info(message: string) { 12 | console.log('custom info:' + message); 13 | } 14 | constructor() {} 15 | } 16 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/angular-cli-app/start/frontend/src/assets/.gitkeep -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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/angular-cli-app/start/frontend/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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/angular-cli-app/start/frontend/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FabianGosebrink/angular-libraries/71c62538cc65025ec9a11a62014ac2359e17bac6/m5/angular-cli-app/start/frontend/src/favicon.ico -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | AngularMaterialApp 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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/angular-cli-app/start/frontend/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 | -------------------------------------------------------------------------------- /m5/angular-cli-app/start/frontend/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/angular-cli-app/start/frontend/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/angular-cli-app/start/frontend/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 | "target": "es5", 13 | "typeRoots": ["node_modules/@types"], 14 | "lib": ["es2017", "dom"], 15 | "paths": { 16 | "@app/*": ["src/app/*"] 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /m5/ng-packagr-demo/.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 | -------------------------------------------------------------------------------- /m5/ng-packagr-demo/.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 | -------------------------------------------------------------------------------- /m5/ng-packagr-demo/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 | }; -------------------------------------------------------------------------------- /m5/ng-packagr-demo/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 ng-packagr-demo!'); 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 | -------------------------------------------------------------------------------- /m5/ng-packagr-demo/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 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------