Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 413dcba

Browse files
Committed the project.
0 parents commit 413dcba

35 files changed

+12292
-0
lines changed

‎README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Perform CRUD Operations in Angular Tree Grid Using Observables
2+
3+
Learn how you can perform CRUD operations in Angular Tree Grid with observable data. This example contains code to perform CRUD operations like insert, update, and delete in the Angular Tree Grid with observable data using the Angular in-memory web API module.
4+
5+
Documentation: https://ej2.syncfusion.com/angular/documentation/treegrid/observables/?no-cache=1#perform-crud-operations
6+
7+
8+
## Project prerequisites
9+
Make sure you have the compatible versions of TypeScript and Angular on your machine before starting to work on this project:
10+
* Angular 4+
11+
* TypeScript 2.6+
12+
13+
## How to run this application
14+
To run this application, you need to first clone the `Perform-CRUD-Operations-in-Angular-Tree-Grid-Using-Observables` repository and then navigate to the path where it has been copied to your system.
15+
16+
To do this, open the Command Prompt and run the following commands, one after the other:
17+
18+
```
19+
git clone https://github.com/SyncfusionExamples/Perform-CRUD-Operations-in-Angular-Tree-Grid-Using-Observables treegrid-example
20+
cd treegrid-example
21+
```
22+
23+
## Installation
24+
Once done with downloading, you need to install the packages required to run this application locally. To do so, run the following command:
25+
26+
```
27+
npm install
28+
```
29+
This will install all the needed Angular packages into your current project.
30+
31+
## Running on a development server
32+
Run the `ng serve` command for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
33+
34+
## Further help
35+
36+
To get more help with the Angular CLI, use `ng help` or check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

‎angular.json

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"editing": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {},
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:browser",
15+
"options": {
16+
"outputPath": "dist/editing",
17+
"index": "src/index.html",
18+
"main": "src/main.ts",
19+
"polyfills": "src/polyfills.ts",
20+
"tsConfig": "src/tsconfig.app.json",
21+
"assets": [
22+
"src/favicon.ico",
23+
"src/assets"
24+
],
25+
"styles": [
26+
"src/styles.css",
27+
"./node_modules/@syncfusion/ej2-material-theme/styles/material.css"
28+
],
29+
"scripts": []
30+
},
31+
"configurations": {
32+
"production": {
33+
"fileReplacements": [
34+
{
35+
"replace": "src/environments/environment.ts",
36+
"with": "src/environments/environment.prod.ts"
37+
}
38+
],
39+
"optimization": true,
40+
"outputHashing": "all",
41+
"sourceMap": false,
42+
"extractCss": true,
43+
"namedChunks": false,
44+
"aot": true,
45+
"extractLicenses": true,
46+
"vendorChunk": false,
47+
"buildOptimizer": true,
48+
"budgets": [
49+
{
50+
"type": "initial",
51+
"maximumWarning": "2mb",
52+
"maximumError": "5mb"
53+
}
54+
]
55+
}
56+
}
57+
},
58+
"serve": {
59+
"builder": "@angular-devkit/build-angular:dev-server",
60+
"options": {
61+
"browserTarget": "editing:build"
62+
},
63+
"configurations": {
64+
"production": {
65+
"browserTarget": "editing:build:production"
66+
}
67+
}
68+
},
69+
"extract-i18n": {
70+
"builder": "@angular-devkit/build-angular:extract-i18n",
71+
"options": {
72+
"browserTarget": "editing:build"
73+
}
74+
},
75+
"test": {
76+
"builder": "@angular-devkit/build-angular:karma",
77+
"options": {
78+
"main": "src/test.ts",
79+
"polyfills": "src/polyfills.ts",
80+
"tsConfig": "src/tsconfig.spec.json",
81+
"karmaConfig": "src/karma.conf.js",
82+
"styles": [
83+
"src/styles.css",
84+
"./node_modules/@syncfusion/ej2-material-theme/styles/material.css"
85+
],
86+
"scripts": [],
87+
"assets": [
88+
"src/favicon.ico",
89+
"src/assets"
90+
]
91+
}
92+
},
93+
"lint": {
94+
"builder": "@angular-devkit/build-angular:tslint",
95+
"options": {
96+
"tsConfig": [
97+
"src/tsconfig.app.json",
98+
"src/tsconfig.spec.json"
99+
],
100+
"exclude": [
101+
"**/node_modules/**"
102+
]
103+
}
104+
}
105+
}
106+
},
107+
"editing-e2e": {
108+
"root": "e2e/",
109+
"projectType": "application",
110+
"prefix": "",
111+
"architect": {
112+
"e2e": {
113+
"builder": "@angular-devkit/build-angular:protractor",
114+
"options": {
115+
"protractorConfig": "e2e/protractor.conf.js",
116+
"devServerTarget": "editing:serve"
117+
},
118+
"configurations": {
119+
"production": {
120+
"devServerTarget": "editing:serve:production"
121+
}
122+
}
123+
},
124+
"lint": {
125+
"builder": "@angular-devkit/build-angular:tslint",
126+
"options": {
127+
"tsConfig": "e2e/tsconfig.e2e.json",
128+
"exclude": [
129+
"**/node_modules/**"
130+
]
131+
}
132+
}
133+
}
134+
}
135+
},
136+
"defaultProject": "editing"
137+
}

‎e2e/protractor.conf.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
};

‎e2e/src/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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.getTitleText()).toEqual('Welcome to editing!');
13+
});
14+
});

‎e2e/src/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getTitleText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

‎e2e/tsconfig.e2e.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /