├── .browserslistrc ├── .editorconfig ├── .gitignore ├── Dockerfile ├── README.md ├── angular.json ├── deployment.yml ├── docker-compose.yml ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── src ├── app │ ├── app-routing.module.ts │ ├── app.component.css │ ├── app.component.html │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── employee │ │ ├── create-employee │ │ │ ├── create-employee.component.css │ │ │ ├── create-employee.component.html │ │ │ ├── create-employee.component.spec.ts │ │ │ └── create-employee.component.ts │ │ ├── employee-list │ │ │ ├── employee-list.component.css │ │ │ ├── employee-list.component.html │ │ │ ├── employee-list.component.spec.ts │ │ │ └── employee-list.component.ts │ │ └── update-employee │ │ │ ├── update-employee.component.css │ │ │ ├── update-employee.component.html │ │ │ ├── update-employee.component.spec.ts │ │ │ └── update-employee.component.ts │ ├── model │ │ ├── api.response.ts │ │ ├── employee.model.ts │ │ └── weightdesc.ts │ └── service │ │ └── employee.service.ts ├── assets │ └── .gitkeep ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── nginx │ └── etc │ │ └── conf.d │ │ └── default.conf ├── polyfills.ts ├── styles.css └── test.ts ├── tsconfig.app.json ├── tsconfig.base.json ├── tsconfig.json ├── tsconfig.spec.json └── tslint.json /.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line. 18 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. 19 | -------------------------------------------------------------------------------- /.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 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.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 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest as builder 2 | 3 | RUN mkdir -p /app 4 | 5 | WORKDIR /app 6 | 7 | COPY . . 8 | 9 | RUN npm install 10 | RUN npm run build --prod 11 | 12 | CMD ["npm", "start"] 13 | 14 | FROM nginx:alpine 15 | COPY src/nginx/etc/conf.d/default.conf /etc/nginx/conf/default.conf 16 | COPY --from=builder app/dist/angular8-crud-demo usr/share/nginx/html 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular8CrudDemo 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.5. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "angular8-crud-demo": { 7 | "projectType": "application", 8 | "schematics": {}, 9 | "root": "", 10 | "sourceRoot": "src", 11 | "prefix": "app", 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:browser", 15 | "options": { 16 | "outputPath": "dist/angular8-crud-demo", 17 | "index": "src/index.html", 18 | "main": "src/main.ts", 19 | "polyfills": "src/polyfills.ts", 20 | "tsConfig": "tsconfig.app.json", 21 | "aot": true, 22 | "assets": [ 23 | "src/favicon.ico", 24 | "src/assets" 25 | ], 26 | 27 | "styles": [ 28 | "src/styles.css", 29 | "node_modules/bootstrap/dist/css/bootstrap.min.css" , 30 | "node_modules/datatables.net-dt/css/jquery.dataTables.css" 31 | ], 32 | "scripts": [ 33 | "node_modules/jquery/dist/jquery.min.js", 34 | "node_modules/bootstrap/dist/js/bootstrap.min.js", 35 | "node_modules/datatables.net/js/jquery.dataTables.js" 36 | ] 37 | }, 38 | "configurations": { 39 | "production": { 40 | "fileReplacements": [ 41 | { 42 | "replace": "src/environments/environment.ts", 43 | "with": "src/environments/environment.prod.ts" 44 | } 45 | ], 46 | "optimization": true, 47 | "outputHashing": "all", 48 | "sourceMap": false, 49 | "extractCss": true, 50 | "namedChunks": false, 51 | "extractLicenses": true, 52 | "vendorChunk": false, 53 | "buildOptimizer": true, 54 | "budgets": [ 55 | { 56 | "type": "initial", 57 | "maximumWarning": "2mb", 58 | "maximumError": "5mb" 59 | }, 60 | { 61 | "type": "anyComponentStyle", 62 | "maximumWarning": "6kb", 63 | "maximumError": "10kb" 64 | } 65 | ] 66 | } 67 | } 68 | }, 69 | "serve": { 70 | "builder": "@angular-devkit/build-angular:dev-server", 71 | "options": { 72 | "browserTarget": "angular8-crud-demo:build" 73 | }, 74 | "configurations": { 75 | "production": { 76 | "browserTarget": "angular8-crud-demo:build:production" 77 | } 78 | } 79 | }, 80 | "extract-i18n": { 81 | "builder": "@angular-devkit/build-angular:extract-i18n", 82 | "options": { 83 | "browserTarget": "angular8-crud-demo:build" 84 | } 85 | }, 86 | "test": { 87 | "builder": "@angular-devkit/build-angular:karma", 88 | "options": { 89 | "main": "src/test.ts", 90 | "polyfills": "src/polyfills.ts", 91 | "tsConfig": "tsconfig.spec.json", 92 | "karmaConfig": "karma.conf.js", 93 | "assets": [ 94 | "src/favicon.ico", 95 | "src/assets" 96 | ], 97 | "styles": [ 98 | "src/styles.css" 99 | ], 100 | "scripts": [] 101 | } 102 | }, 103 | "lint": { 104 | "builder": "@angular-devkit/build-angular:tslint", 105 | "options": { 106 | "tsConfig": [ 107 | "tsconfig.app.json", 108 | "tsconfig.spec.json", 109 | "e2e/tsconfig.json" 110 | ], 111 | "exclude": [ 112 | "**/node_modules/**" 113 | ] 114 | } 115 | }, 116 | "e2e": { 117 | "builder": "@angular-devkit/build-angular:protractor", 118 | "options": { 119 | "protractorConfig": "e2e/protractor.conf.js", 120 | "devServerTarget": "angular8-crud-demo:serve" 121 | }, 122 | "configurations": { 123 | "production": { 124 | "devServerTarget": "angular8-crud-demo:serve:production" 125 | } 126 | } 127 | } 128 | } 129 | } 130 | }, 131 | "defaultProject": "angular8-crud-demo", 132 | "cli": { 133 | "analytics": "83e87c7a-b222-4978-be6e-c44059c08f28" 134 | } 135 | } -------------------------------------------------------------------------------- /deployment.yml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 # For versions before 1.9.0 use apps/v1beta2 2 | kind: Deployment 3 | metadata: # Data that helps uniquely identify the object (using name, UID and namespace) 4 | name: angular-k8s-deployment 5 | spec: # What state you desire for the object 6 | selector: # The selector field defines how the deployment finds which pod to manage 7 | matchLabels: 8 | app: angular-k8s-deployment 9 | replicas: 3 # Tells the deployment to run 3 pods matching the template 10 | template: 11 | metadata: 12 | labels: # Labels are used as indentifying attributes for objects such as pods and replication controller. 13 | app: angular-k8s-deployment 14 | spec: 15 | containers: 16 | - name: angular-k8s-deployment 17 | image: angular-app:latest 18 | imagePullPolicy: Never 19 | ports: 20 | - containerPort: 80 21 | --- 22 | apiVersion: v1 23 | kind: Service 24 | metadata: 25 | name: angular-k8s-service 26 | labels: 27 | name: angular-k8s-deployment 28 | spec: 29 | ports: 30 | - nodePort: 30170 # make the service available to network requests from external clients 31 | port: 80 # access the service via external port no 32 | targetPort: 80 # port number that container listening on 33 | protocol: TCP 34 | selector: 35 | app: angular-k8s-deployment 36 | type: NodePort # which expose the application on a port across a each of your nodes 37 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.5' # specify docker-compose version 2 | 3 | # Define the services/containers to be run 4 | services: 5 | angular-service: # name of the first service 6 | container_name: angular-container2 7 | build: ./ # specify the directory of the Dockerfile 8 | volumes: # Volume binding 9 | - './:/usr/src/app' 10 | ports: 11 | - "4200:80" # specify port forewarding 12 | command: > 13 | bash -c "npm start" 14 | # docker-nginx: 15 | # container_name: docker-nginx 16 | # build: ./ 17 | # ports: 18 | # - "80:80" 19 | # command: ["nginx", "-g", "daemon off;"] 20 | # links: 21 | # - angular-service 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | browserName: 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ 31 | spec: { 32 | displayStacktrace: StacktraceOption.PRETTY 33 | } 34 | })); 35 | } 36 | }; -------------------------------------------------------------------------------- /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('angular8-crud-demo app is running!'); 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 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo(): Promise { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText(): Promise { 9 | return element(by.css('app-root .content span')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "../tsconfig.base.json", 4 | "compilerOptions": { 5 | "outDir": "../out-tsc/e2e", 6 | "module": "commonjs", 7 | "target": "es2018", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, './coverage/angular8-crud-demo'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular8-crud-demo", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve --host 0.0.0.0", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "~10.0.6", 15 | "@angular/common": "~10.0.6", 16 | "@angular/compiler": "~10.0.6", 17 | "@angular/core": "~10.0.6", 18 | "@angular/forms": "~10.0.6", 19 | "@angular/platform-browser": "~10.0.6", 20 | "@angular/platform-browser-dynamic": "~10.0.6", 21 | "@angular/router": "~10.0.6", 22 | "angular-data-table": "^0.8.1", 23 | "angular-datatables": "^9.0.2", 24 | "bootstrap": "^4.5.2", 25 | "datatables.net": "^1.10.21", 26 | "datatables.net-dt": "^1.10.21", 27 | "jquery": "^3.5.1", 28 | "ngx-bootstrap": "^5.6.1", 29 | "rxjs": "~6.5.5", 30 | "tslib": "^2.0.0", 31 | "zone.js": "~0.10.3" 32 | }, 33 | "devDependencies": { 34 | "@angular-devkit/build-angular": "~0.1000.5", 35 | "@angular/cli": "~10.0.5", 36 | "@angular/compiler-cli": "~10.0.6", 37 | "@types/datatables.net": "^1.10.19", 38 | "@types/jasmine": "~3.5.0", 39 | "@types/jasminewd2": "~2.0.3", 40 | "@types/jquery": "^3.5.1", 41 | "@types/node": "^12.11.1", 42 | "codelyzer": "^6.0.0", 43 | "jasmine-core": "~3.5.0", 44 | "jasmine-spec-reporter": "~5.0.0", 45 | "karma": "~5.0.0", 46 | "karma-chrome-launcher": "~3.1.0", 47 | "karma-coverage-istanbul-reporter": "~3.0.2", 48 | "karma-jasmine": "~3.3.0", 49 | "karma-jasmine-html-reporter": "^1.5.0", 50 | "protractor": "~7.0.0", 51 | "ts-node": "~8.3.0", 52 | "tslint": "~6.1.0", 53 | "typescript": "~3.9.5" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | import { CreateEmployeeComponent } from './employee/create-employee/create-employee.component'; 4 | import { EmployeeListComponent } from './employee/employee-list/employee-list.component'; 5 | import { UpdateEmployeeComponent } from './employee/update-employee/update-employee.component'; 6 | 7 | const routes: Routes = [ 8 | { path: '', redirectTo: 'employee', pathMatch: 'full' }, 9 | { path: 'add', component: CreateEmployeeComponent }, 10 | { path: 'employees', component: EmployeeListComponent }, 11 | { path: 'update/:id', component: UpdateEmployeeComponent }, 12 | 13 | 14 | 15 | ]; 16 | 17 | @NgModule({ 18 | imports: [RouterModule.forRoot(routes)], 19 | exports: [RouterModule] 20 | }) 21 | export class AppRoutingModule { } 22 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shameed1910/angular8-crud-demo/024976ad0ba907150ffa9e592ede26c24f1abafc/src/app/app.component.css -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 24 |
25 |
26 |

SPRING BOOT-ANGULAR 8-CRUD API WITH DATA TABLE

27 |
28 |
29 |
30 | 31 |
32 |
33 |
34 | 35 |
36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async(() => { 7 | TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | })); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'angular8-crud-demo'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.componentInstance; 26 | expect(app.title).toEqual('angular8-crud-demo'); 27 | }); 28 | 29 | it('should render title', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.nativeElement; 33 | expect(compiled.querySelector('.content span').textContent).toContain('angular8-crud-demo app is running!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /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 = 'angular8-crud-demo'; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppRoutingModule } from './app-routing.module'; 5 | import { AppComponent } from './app.component'; 6 | import { CreateEmployeeComponent } from './employee/create-employee/create-employee.component'; 7 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 8 | import { EmployeeService } from './service/employee.service'; 9 | import { HttpClientModule } from '@angular/common/http'; 10 | import { EmployeeListComponent } from './employee/employee-list/employee-list.component'; 11 | import { UpdateEmployeeComponent } from './employee/update-employee/update-employee.component'; 12 | import { DataTablesModule } from 'angular-datatables'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | AppComponent, 17 | CreateEmployeeComponent, 18 | EmployeeListComponent, 19 | UpdateEmployeeComponent, 20 | 21 | 22 | ], 23 | imports: [ 24 | BrowserModule, 25 | AppRoutingModule, 26 | FormsModule, 27 | HttpClientModule, 28 | ReactiveFormsModule, 29 | DataTablesModule 30 | ], 31 | providers: [EmployeeService], 32 | bootstrap: [AppComponent] 33 | }) 34 | export class AppModule { } 35 | -------------------------------------------------------------------------------- /src/app/employee/create-employee/create-employee.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shameed1910/angular8-crud-demo/024976ad0ba907150ffa9e592ede26c24f1abafc/src/app/employee/create-employee/create-employee.component.css -------------------------------------------------------------------------------- /src/app/employee/create-employee/create-employee.component.html: -------------------------------------------------------------------------------- 1 |

Create Employee

2 |
3 |
4 |
5 | 6 | 7 |
8 | 9 |
10 | 11 | 12 |
13 | 14 |
15 | 16 | 17 |
18 |
19 | 20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | -------------------------------------------------------------------------------- /src/app/employee/create-employee/create-employee.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CreateEmployeeComponent } from './create-employee.component'; 4 | 5 | describe('CreateEmployeeComponent', () => { 6 | let component: CreateEmployeeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CreateEmployeeComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CreateEmployeeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/employee/create-employee/create-employee.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { EmployeeService } from 'src/app/service/employee.service'; 3 | import { Employee } from 'src/app/model/employee.model'; 4 | 5 | import { Component, OnInit } from '@angular/core'; 6 | import {FormControl, FormGroup, Validators} from "@angular/forms"; 7 | 8 | import {Router} from '@angular/router'; 9 | 10 | 11 | @Component({ 12 | selector: 'app-create-employee', 13 | templateUrl: './create-employee.component.html', 14 | styleUrls: ['./create-employee.component.css'] 15 | }) 16 | export class CreateEmployeeComponent implements OnInit { 17 | 18 | employee: Employee = new Employee(); 19 | submitted = false; 20 | 21 | constructor(private employeeService: EmployeeService, 22 | private router: Router) { } 23 | 24 | ngOnInit() { 25 | } 26 | 27 | 28 | onSubmit() { 29 | this.submitted = true; 30 | this.employeeService.createEmployee(this.employee) 31 | .subscribe(data => console.log(data), error => console.log(error)); 32 | this.employee = new Employee(); 33 | this.router.navigate(['/employees']); 34 | } 35 | 36 | 37 | } 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/app/employee/employee-list/employee-list.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shameed1910/angular8-crud-demo/024976ad0ba907150ffa9e592ede26c24f1abafc/src/app/employee/employee-list/employee-list.component.css -------------------------------------------------------------------------------- /src/app/employee/employee-list/employee-list.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Employee List

4 |
5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 |
NameEmailDepartmentPhoneActions
{{employee.name}}{{employee.email}}{{employee.department}}{{employee.phone}} 25 | 26 |
30 |
31 |
32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/app/employee/employee-list/employee-list.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EmployeeListComponent } from './employee-list.component'; 4 | 5 | describe('EmployeeListComponent', () => { 6 | let component: EmployeeListComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ EmployeeListComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(EmployeeListComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/employee/employee-list/employee-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | import { Employee } from 'src/app/model/employee.model'; 3 | import { EmployeeService } from 'src/app/service/employee.service'; 4 | import { Observable } from 'rxjs'; 5 | import { Router } from '@angular/router'; 6 | import { ApiResponse } from 'src/app/model/api.response'; 7 | 8 | @Component({ 9 | selector: 'app-employee-list', 10 | templateUrl: './employee-list.component.html', 11 | styleUrls: ['./employee-list.component.css'] 12 | }) 13 | export class EmployeeListComponent implements OnInit { 14 | 15 | employees: Observable; 16 | //dtOptions: DataTables.Settings = {}; 17 | //@ViewChild('dtOptions', {static: true}) table; 18 | 19 | constructor(private employeeService: EmployeeService, 20 | private router: Router) { 21 | setTimeout(function(){ 22 | $(function(){ 23 | $('#example').DataTable(); 24 | }); 25 | },2000); 26 | 27 | } 28 | 29 | ngOnInit() { 30 | this.employees = this.employeeService.getEmployees(); 31 | setTimeout(function(){ 32 | $(function(){ 33 | $('#example').DataTable(); 34 | }); 35 | },2000); 36 | 37 | } 38 | 39 | deleteEmployee(id: number) { 40 | this.employeeService.deleteEmployee(id) 41 | .subscribe( 42 | data => { 43 | console.log(data); 44 | this.employees = this.employeeService.getEmployees(); 45 | }, 46 | error => console.log(error)); 47 | } 48 | 49 | updateEmployee(id: number){ 50 | this.router.navigate(['update', id]); 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/app/employee/update-employee/update-employee.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shameed1910/angular8-crud-demo/024976ad0ba907150ffa9e592ede26c24f1abafc/src/app/employee/update-employee/update-employee.component.css -------------------------------------------------------------------------------- /src/app/employee/update-employee/update-employee.component.html: -------------------------------------------------------------------------------- 1 |

2 | Update Employee 3 |

4 |
5 |
6 | 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 |
24 | 25 | 26 | 27 |
28 | -------------------------------------------------------------------------------- /src/app/employee/update-employee/update-employee.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { UpdateEmployeeComponent } from './update-employee.component'; 4 | 5 | describe('UpdateEmployeeComponent', () => { 6 | let component: UpdateEmployeeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ UpdateEmployeeComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(UpdateEmployeeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/employee/update-employee/update-employee.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { ActivatedRoute, Router } from '@angular/router'; 3 | import { Employee } from 'src/app/model/employee.model'; 4 | import { EmployeeService } from 'src/app/service/employee.service'; 5 | import { ApiResponse } from 'src/app/model/api.response'; 6 | 7 | @Component({ 8 | selector: 'app-update-employee', 9 | templateUrl: './update-employee.component.html', 10 | styleUrls: ['./update-employee.component.css'] 11 | }) 12 | export class UpdateEmployeeComponent implements OnInit { 13 | 14 | id: number; 15 | employee: Employee; 16 | apiResponse:ApiResponse; 17 | 18 | constructor(private route: ActivatedRoute,private router: Router, 19 | private employeeService: EmployeeService) { } 20 | 21 | ngOnInit() { 22 | this.employee = new Employee(); 23 | 24 | this.id = this.route.snapshot.params['id']; 25 | this.employeeService.getEmployeeById(this.id) 26 | .subscribe(data => { 27 | console.log(data) 28 | this.employee = data; 29 | }, error => console.log(error)); 30 | } 31 | 32 | onSubmit() { 33 | this.employeeService.updateEmployee(this.id, this.employee) 34 | .subscribe(data => console.log(data), error => console.log(error)); 35 | this.employee = new Employee(); 36 | this.router.navigate(['/employees']); 37 | } 38 | 39 | 40 | list(){ 41 | this.router.navigate(['employees']); 42 | } 43 | } -------------------------------------------------------------------------------- /src/app/model/api.response.ts: -------------------------------------------------------------------------------- 1 | export class ApiResponse{ 2 | status:number; 3 | message:number; 4 | result: any; 5 | } -------------------------------------------------------------------------------- /src/app/model/employee.model.ts: -------------------------------------------------------------------------------- 1 | export class Employee { 2 | id: number; 3 | name: string; 4 | email: string; 5 | phone: number; 6 | department: string; 7 | 8 | 9 | 10 | 11 | } -------------------------------------------------------------------------------- /src/app/model/weightdesc.ts: -------------------------------------------------------------------------------- 1 | export class weightdesc{ 2 | constructor(public id:number, public name:string){ 3 | 4 | } 5 | } -------------------------------------------------------------------------------- /src/app/service/employee.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { HttpClient } from '@angular/common/http'; 3 | import {Observable} from "rxjs/index"; 4 | import { ApiResponse } from '../model/api.response'; 5 | import { Employee } from '../model/employee.model'; 6 | import { environment } from 'src/environments/environment'; 7 | 8 | @Injectable() 9 | export class EmployeeService { 10 | 11 | constructor(private http: HttpClient) { } 12 | private baseUrl: string = environment.baseUrl+'/api/employees/'; 13 | 14 | 15 | 16 | getEmployees() : Observable { 17 | return this.http.get(this.baseUrl); 18 | } 19 | 20 | getEmployeeById(id: number): Observable { 21 | return this.http.get(this.baseUrl + id); 22 | } 23 | 24 | createEmployee(employee: Employee): Observable { 25 | return this.http.post(this.baseUrl, employee); 26 | } 27 | 28 | updateEmployee(id: number, employee: Employee): Observable { 29 | return this.http.put(this.baseUrl + employee.id, employee); 30 | } 31 | 32 | deleteEmployee(id: number): Observable { 33 | return this.http.delete(this.baseUrl + id); 34 | } 35 | } -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shameed1910/angular8-crud-demo/024976ad0ba907150ffa9e592ede26c24f1abafc/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /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 | //baseUrl: 'http://localhost:8080' 8 | baseUrl: 'http://ip:30163' 9 | 10 | }; 11 | 12 | /* 13 | * For easier debugging in development mode, you can import the following file 14 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 15 | * 16 | * This import should be commented out in production mode because it will have a negative impact 17 | * on performance if an error is thrown. 18 | */ 19 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 20 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shameed1910/angular8-crud-demo/024976ad0ba907150ffa9e592ede26c24f1abafc/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Angular8CrudDemo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/nginx/etc/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | listen 80; 4 | 5 | server_name http://192.168.64.4; 6 | 7 | root /usr/share/nginx/html; 8 | 9 | index index.html index.html; 10 | 11 | location /api/employees { 12 | 13 | proxy_pass http://http://192.168.64.4:30163/api/employees; 14 | 15 | } 16 | 17 | 18 | location / { 19 | 20 | try_files $uri $uri/ /index.html; 21 | 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 22 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 23 | 24 | /** 25 | * Web Animations `@angular/platform-browser/animations` 26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 28 | */ 29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 30 | 31 | /** 32 | * By default, zone.js will patch all possible macroTask and DomEvents 33 | * user can disable parts of macroTask/DomEvents patch by setting following flags 34 | * because those flags need to be set before `zone.js` being loaded, and webpack 35 | * will put import in the top of bundle, so user need to create a separate file 36 | * in this directory (for example: zone-flags.ts), and put the following flags 37 | * into that file, and then add the following code before importing zone.js. 38 | * import './zone-flags'; 39 | * 40 | * The flags allowed in zone-flags.ts are listed here. 41 | * 42 | * The following flags will work for all browsers. 43 | * 44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 46 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 47 | * 48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 50 | * 51 | * (window as any).__Zone_enable_cross_context_check = true; 52 | * 53 | */ 54 | 55 | /*************************************************************************************************** 56 | * Zone JS is required by default for Angular itself. 57 | */ 58 | import 'zone.js/dist/zone'; // Included with Angular CLI. 59 | 60 | 61 | /*************************************************************************************************** 62 | * APPLICATION IMPORTS 63 | */ 64 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shameed1910/angular8-crud-demo/024976ad0ba907150ffa9e592ede26c24f1abafc/src/styles.css -------------------------------------------------------------------------------- /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: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | keys(): string[]; 13 | (id: string): T; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting() 21 | ); 22 | // Then we find all the tests. 23 | const context = require.context('./', true, /\.spec\.ts$/); 24 | // And load the modules. 25 | context.keys().map(context); 26 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.base.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "downlevelIteration": true, 10 | "experimentalDecorators": true, 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "module": "es2020", 15 | "lib": [ 16 | "es2018", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | /* 2 | This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience. 3 | It is not intended to be used to perform a compilation. 4 | 5 | To learn more about this file see: https://angular.io/config/solution-tsconfig. 6 | */ 7 | { 8 | "files": [], 9 | "references": [ 10 | { 11 | "path": "./tsconfig.app.json" 12 | }, 13 | { 14 | "path": "./tsconfig.spec.json" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.base.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rules": { 4 | "align": { 5 | "options": [ 6 | "parameters", 7 | "statements" 8 | ] 9 | }, 10 | "array-type": false, 11 | "arrow-return-shorthand": true, 12 | "curly": true, 13 | "deprecation": { 14 | "severity": "warning" 15 | }, 16 | "component-class-suffix": true, 17 | "contextual-lifecycle": true, 18 | "directive-class-suffix": true, 19 | "directive-selector": [ 20 | true, 21 | "attribute", 22 | "app", 23 | "camelCase" 24 | ], 25 | "component-selector": [ 26 | true, 27 | "element", 28 | "app", 29 | "kebab-case" 30 | ], 31 | "eofline": true, 32 | "import-blacklist": [ 33 | true, 34 | "rxjs/Rx" 35 | ], 36 | "import-spacing": true, 37 | "indent": { 38 | "options": [ 39 | "spaces" 40 | ] 41 | }, 42 | "max-classes-per-file": false, 43 | "max-line-length": [ 44 | true, 45 | 140 46 | ], 47 | "member-ordering": [ 48 | true, 49 | { 50 | "order": [ 51 | "static-field", 52 | "instance-field", 53 | "static-method", 54 | "instance-method" 55 | ] 56 | } 57 | ], 58 | "no-console": [ 59 | true, 60 | "debug", 61 | "info", 62 | "time", 63 | "timeEnd", 64 | "trace" 65 | ], 66 | "no-empty": false, 67 | "no-inferrable-types": [ 68 | true, 69 | "ignore-params" 70 | ], 71 | "no-non-null-assertion": true, 72 | "no-redundant-jsdoc": true, 73 | "no-switch-case-fall-through": true, 74 | "no-var-requires": false, 75 | "object-literal-key-quotes": [ 76 | true, 77 | "as-needed" 78 | ], 79 | "quotemark": [ 80 | true, 81 | "single" 82 | ], 83 | "semicolon": { 84 | "options": [ 85 | "always" 86 | ] 87 | }, 88 | "space-before-function-paren": { 89 | "options": { 90 | "anonymous": "never", 91 | "asyncArrow": "always", 92 | "constructor": "never", 93 | "method": "never", 94 | "named": "never" 95 | } 96 | }, 97 | "typedef": [ 98 | true, 99 | "call-signature" 100 | ], 101 | "typedef-whitespace": { 102 | "options": [ 103 | { 104 | "call-signature": "nospace", 105 | "index-signature": "nospace", 106 | "parameter": "nospace", 107 | "property-declaration": "nospace", 108 | "variable-declaration": "nospace" 109 | }, 110 | { 111 | "call-signature": "onespace", 112 | "index-signature": "onespace", 113 | "parameter": "onespace", 114 | "property-declaration": "onespace", 115 | "variable-declaration": "onespace" 116 | } 117 | ] 118 | }, 119 | "variable-name": { 120 | "options": [ 121 | "ban-keywords", 122 | "check-format", 123 | "allow-pascal-case" 124 | ] 125 | }, 126 | "whitespace": { 127 | "options": [ 128 | "check-branch", 129 | "check-decl", 130 | "check-operator", 131 | "check-separator", 132 | "check-type", 133 | "check-typecast" 134 | ] 135 | }, 136 | "no-conflicting-lifecycle": true, 137 | "no-host-metadata-property": true, 138 | "no-input-rename": true, 139 | "no-inputs-metadata-property": true, 140 | "no-output-native": true, 141 | "no-output-on-prefix": true, 142 | "no-output-rename": true, 143 | "no-outputs-metadata-property": true, 144 | "template-banana-in-box": true, 145 | "template-no-negated-async": true, 146 | "use-lifecycle-interface": true, 147 | "use-pipe-transform-interface": true 148 | }, 149 | "rulesDirectory": [ 150 | "codelyzer" 151 | ] 152 | } --------------------------------------------------------------------------------