├── src ├── assets │ └── .gitkeep ├── app │ ├── app.component.css │ ├── components │ │ ├── edit │ │ │ ├── edit.component.css │ │ │ ├── edit.component.ts │ │ │ └── edit.component.html │ │ ├── create │ │ │ ├── create.component.css │ │ │ ├── create.component.ts │ │ │ └── create.component.html │ │ └── index │ │ │ ├── index.component.css │ │ │ ├── AdUnit.ts │ │ │ ├── index.component.html │ │ │ └── index.component.ts │ ├── app.component.html │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── adunit.service.ts │ └── app.module.ts ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── styles.css ├── tsconfig.app.json ├── index.html ├── tsconfig.spec.json ├── tslint.json ├── browserslist ├── main.ts ├── test.ts ├── karma.conf.js └── polyfills.ts ├── config └── DB.js ├── e2e ├── src │ ├── app.po.ts │ └── app.e2e-spec.ts ├── tsconfig.e2e.json └── protractor.conf.js ├── .editorconfig ├── models └── AdUnit.js ├── tsconfig.json ├── .gitignore ├── server.js ├── README.md ├── package.json ├── routes └── adunit.route.js ├── tslint.json └── angular.json /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/edit/edit.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/create/create.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/index/index.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/DB.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | DB: 'mongodb://localhost:27017/ng6crud' 3 | }; -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KrunalLathiya/Angular6CRUDTutorial/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | @import "~bootstrap/dist/css/bootstrap.min.css"; 2 | @import "../node_modules/ng2-slim-loading-bar/style.css"; -------------------------------------------------------------------------------- /src/app/components/index/AdUnit.ts: -------------------------------------------------------------------------------- 1 | export interface AdUnit { 2 | id: Number; 3 | unit_name: String; 4 | unit_price: Number; 5 | } 6 | -------------------------------------------------------------------------------- /src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 || Ad Unit Name | 5 |Ad Unit Price | 6 |Actions | 7 ||
| {{ adunit.unit_name }} | 13 |{{ adunit.unit_price }} | 14 |Edit | 15 |16 | |