---
title: Generate Domain Model Code
product: Survey Creator
description: With SurveyJS, you can collect data from your clients and users without having to build a client-side app with multiple pages for each form. View a free demo for JavaScript to learn how to generate form definition for a domain model in JSON and edit both of them in a no-code visual editor.
framework: Angular
source: https://surveyjs.io/survey-creator/examples/create-domain-models/angular
index: https://surveyjs.io/survey-creator/examples/overview.md
---

# Generate Domain Model Code (Angular)

This example demonstrates how to generate server-side domain model code based on a client-side survey JSON schema. This functionality is part of a wider use case described in the following help topic: [No-code Editor for Domain Models](https://surveyjs.io/documentation/no-code-editor-for-domain-models).

To generate domain model code in your application, implement a text parser that converts JSON to the server-side code language you prefer (C# in this demo). View the `codegenerator.js` file to see the implementation.

In this demo, you can see the generated domain model code under the Domain Model Code tab in Survey Creator. To implement this UI, create a component that renders a `<textarea>` and call the [`addTab(tabOptions)`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#addTab) method on a [`SurveyCreatorModel`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator) instance to register the component as a plugin.

Domain model property names are converted from form field names, so you need to ensure against unsupported symbols. Handle Survey Creator's [`onPropertyDisplayCustomError`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onPropertyDisplayCustomError) event to validate the names.

## Files

### `src/app/components/creator.component.css`

```css
/* You can define custom CSS rules here */
```

### `src/app/components/creator.component.html`

```html
<div style="position: fixed; top: 0; bottom: 0; right: 0; left: 0;">
    <survey-creator [model]="model"></survey-creator>
</div>
```

### `src/app/components/servercode.component.css`

```css
.generatortextarea {
    width: 100%;
    height: 100%;
    padding: 7px;
}
:host {
    width: 100%;
}
```

### `src/app/components/servercode.component.html`

```html
<textarea class="generatortextarea" data-bind="value:generatedCode">
{{serverCode}}
</textarea>
```

### `src/app/components/servercode.component.ts`

```ts
import { Component, OnInit, Input } from "@angular/core";
import { SurveyCreatorModel } from "survey-creator-core";
import { AngularComponentFactory, BaseAngular } from "survey-angular-ui";
import { generateDomainModelCode } from "./codegenerator";

@Component({
    // tslint:disable-next-line:component-selector
    selector: "svc-tab-servercode",
    templateUrl: "./servercode.component.html",
    styleUrls: ["./servercode.component.css"]
})
export class TabServerCodeComponent extends BaseAngular<SurveyCreatorModel> implements OnInit {
    @Input() model!: SurveyCreatorModel;
    public serverCode: string;
    ngOnInit() {
        this.serverCode = generateDomainModelCode(this.model.survey);
    }
    protected getModel(): any {
        return null;
    }
}
AngularComponentFactory.Instance.registerComponent(
    "svc-tab-servercode",
    TabServerCodeComponent
);
```

### `src/app/components/codegenerator.js`

```js
function isNameCorrect(name) {
    return /^@?[a-zA-Z_]\w*(\.@?[a-zA-Z_]\w*)*$/.test(name);
}

function isListQuestionType(el) {
    return ["paneldynamic", "matrixdynamic", "matrixdropdown"].indexOf(el.getType()) > -1;
}

function getNestedItemClassName(name) {
    return name + "Item";
}

function getElementTypeName(el) {
    if (isListQuestionType(el)) return "IList<" + getNestedItemClassName(el.name) + ">";
    if (el.getType() === "text") {
        if (el.inputType === "number") return "int";
        if (el.inputType === "date" || el.inputType === "localedate") return "DateTime";
    }
    if (el.getType() === "boolean") return "bool"
    return "string";
}
function getCodePadding() { return "    "; }

function generateClassByElements(className, elements, lines) {
    lines.push("public class " + className + " {");
    elements.forEach(el => {
        if (el.isQuestion || el.getType() === "matrixdropdowncolumn") {
            lines.push(getCodePadding() + getElementTypeName(el) + " " + el.name + " { get; set; }")
        }
    });
    lines.push("}")
}

export function generateDomainModelCode(survey) {
    const lines = [];
    generateClassByElements(survey.name, survey.getAllQuestions(), lines);
    survey.getAllQuestions().forEach(q => {
        if (!isListQuestionType(q)) return;
        if (q.getType() === "paneldynamic") {
            lines.push("");
            generateClassByElements(getNestedItemClassName(q.name), q.elements, lines);
        } else {
            lines.push("");
            generateClassByElements(getNestedItemClassName(q.name), q.columns, lines);
        }
    });
    return lines.join("\n");
}
```

### `src/app/components/survey_json.js`

```js
export const formJSON = {
  "name": "PatientAssessment",
  "title": "Patient Assessment Form",
  "checkErrorsMode": "onValueChanged",
  "questionErrorLocation": "bottom",
  "pages": [
    {
      "name": "PatientInformation",
      "title": "Patient information",
      "navigationTitle": "Patient information",
      "elements": [
        {
          "type": "panel",
          "name": "patient-information",
          "title": "All fields with an asterisk (*) are required fields, and must be filled out in order to process the information in strict confidentiality.",
          "elements": [
            {
              "type": "text",
              "name": "FirstName",
              "title": "First name",
              "isRequired": true
            },
            {
              "type": "text",
              "name": "LastName",
              "startWithNewLine": false,
              "title": "Last name",
              "isRequired": true
            },
            {
              "type": "text",
              "name": "SSN",
              "title": "Social Security number",
              "requiredErrorText": "You SSN must be a 9-digit number.",
              "isRequired": true
            },
            {
              "type": "text",
              "name": "BirthDate",
              "startWithNewLine": false,
              "title": "Date of birth",
              "isRequired": true,
              "inputType": "date"
            },
            {
              "type": "text",
              "name": "Concerns",
              "title": "List any concerns you want to talk about during your visit"
            }
          ]
        }
      ]
    },
    {
      "name": "HealthHistory",
      "title": "Health history",
      "navigationTitle": "Health history",
      "elements": [
        {
          "type": "panel",
          "name": "health-history",
          "elements": [
            {
              "type": "boolean",
              "name": "Diabetes",
              "title": "Do you have diabetes?",
              "startWithNewLine": false
            },
            {
              "type": "boolean",
              "name": "HighBloodPressure",
              "title": "High blood pressure?",
              "startWithNewLine": false
            },
            {
              "type": "boolean",
              "name": "HighCholesterol",
              "title": "High cholesterol?",
              "startWithNewLine": false
            },
            {
              "type": "comment",
              "name": "OtherHealthConditions",
              "title": "Do you have other health conditions?"
            }
          ]
        }
      ]
    },
    {
      "name": "SocialHistory",
      "title": "Social history",
      "navigationTitle": "Social history",
      "elements": [
        {
          "type": "panel",
          "name": "social-history",
          "elements": [
            {
              "type": "panel",
              "name": "smoking",
              "elements": [
                {
                  "type": "radiogroup",
                  "name": "Cigarettes",
                  "title": "Do you smoke cigarettes?",
                  "choices": [
                    {
                      "value": "never",
                      "text": "Never"
                    },
                    {
                      "value": "yes",
                      "text": "Yes"
                    },
                    {
                      "value": "quit",
                      "text": "Quit"
                    }
                  ]
                },
                {
                  "type": "text",
                  "name": "CigarettesPacksPerDay",
                  "visibleIf": "{Cigarettes} = 'yes'",
                  "title": "How many packs a day?",
                  "inputType": "number",
                  "min": 0
                },
                {
                  "name": "date-quit",
                  "title": "CigarettesDateQuit",
                  "inputType": "date",
                  "maxValueExpression": "today()",
                  "visibleIf": "{Cigarettes} = 'quit'"
                },
                {
                  "name": "CigarettesYearsSmoked",
                  "title": "Years smoked",
                  "inputType": "number",
                  "min": 0,
                  "visibleIf": "{Cigarettes} = 'quit'"
                },
                {
                  "type": "boolean",
                  "name": "CigarettesVape",
                  "title": "Do you vape (e-cigarettes)?"
                }
              ]
            },
            {
              "type": "panel",
              "name": "alcohol-use-history",
              "elements": [
                {
                  "type": "boolean",
                  "name": "Alcohol",
                  "title": "Do you drink alcohol?"
                },
                {
                  "type": "text",
                  "name": "DrinksPerWeek",
                  "inputType": "number",
                  "visibleIf": "{Alcohol} = true",
                  "title": "How many drinks per week?"
                }
              ],
              "startWithNewLine": false
            },
            {
              "type": "panel",
              "name": "drug-use-history",
              "elements": [
                {
                  "type": "checkbox",
                  "name": "RecreationalDrugs",
                  "title": "Do you use recreational drugs?",
                  "choices": [
                    {
                      "value": "rarely",
                      "text": "Rarely"
                    },
                    {
                      "value": "marijuana",
                      "text": "Marijuana"
                    },
                    {
                      "value": "cocaine",
                      "text": "Cocaine"
                    },
                    {
                      "value": "opioids",
                      "text": "Opioids"
                    }
                  ],
                  "showOtherItem": true,
                  "otherPlaceholder": "Please specify... ",
                  "otherText": "Other",
                  "showNoneItem": true,
                  "noneText": "Never",
                  "colCount": 3
                },
                {
                  "type": "text",
                  "name": "DrugUseTimesPerMonth",
                  "visibleIf": "{RecreationalDrugs} anyof ['rarely', 'marijuana', 'cocaine', 'opioids', 'other']",
                  "title": "How many times per month",
                  "description": "If you take different types of drugs, please specify the frequency of use for each in a 'drug - # times/month' format."
                }
              ]
            },
            {
              "type": "panel",
              "name": "personal-info",
              "elements": [
                {
                  "type": "dropdown",
                  "name": "Education",
                  "title": "What is your highest level of education completed?",
                  "choices": [
                    {
                      "value": "high-school",
                      "text": "High School"
                    },
                    {
                      "value": "trade-school",
                      "text": "Trade School"
                    },
                    {
                      "value": "college",
                      "text": "College"
                    },
                    {
                      "value": "post-graduate",
                      "text": "Post-graduate degree(s)"
                    }
                  ]
                },
                {
                  "type": "dropdown",
                  "name": "MaritalStatus",
                  "title": "What is your marital status?",
                  "choices": [
                    {
                      "value": "married",
                      "text": "Married"
                    },
                    {
                      "value": "partnership",
                      "text": "Partnership"
                    },
                    {
                      "value": "divorced",
                      "text": "Divorced"
                    },
                    {
                      "value": "separated",
                      "text": "Separated"
                    },
                    {
                      "value": "single",
                      "text": "Single"
                    },
                    {
                      "value": "widow",
                      "text": "Widow(er)"
                    }
                  ]
                },
                {
                  "type": "panel",
                  "name": "sexual-life",
                  "elements": [
                    {
                      "type": "boolean",
                      "name": "SexuallyActive",
                      "title": "Are you sexually active?"
                    },
                    {
                      "type": "text",
                      "name": "SexualPartnersNumber",
                      "title": "How many sexual partners do you have?",
                      "inputType": "number",
                      "min": 0
                    },
                    {
                      "type": "radiogroup",
                      "name": "SexualPartnersGender",
                      "titleLocation": "hidden",
                      "choices": [
                        {
                          "value": "men",
                          "text": "Men"
                        },
                        {
                          "value": "women",
                          "text": "Women"
                        },
                        {
                          "value": "both",
                          "text": "Both"
                        }
                      ],
                      "colCount": 3
                    },
                    {
                      "type": "boolean",
                      "name": "Contraception",
                      "title": "Do you use contraception?"
                    },
                    {
                      "type": "comment",
                      "name": "ContraceptionComment",
                      "title": "What type of contraception do you use?",
                      "visibleIf": "{Contraception} = true"
                    }
                  ]
                }
              ]
            },
            {
              "type": "panel",
              "name": "employment-exercises-children",
              "startWithNewLine": false,
              "elements": [
                {
                  "type": "radiogroup",
                  "name": "Employment",
                  "title": "Are you employed?",
                  "choices": [
                    {
                      "value": "yes",
                      "text": "Yes"
                    },
                    {
                      "value": "no",
                      "text": "No"
                    },
                    {
                      "value": "retired",
                      "text": "Retired"
                    }
                  ],
                  "colCount": 3
                },
                {
                  "type": "comment",
                  "name": "EmploymentComment",
                  "title": "Type of work"
                },
                {
                  "type": "panel",
                  "name": "physical-activity",
                  "elements": [
                    {
                      "type": "boolean",
                      "name": "DoExercise",
                      "title": "Do you exercise?"
                    },
                    {
                      "type": "text",
                      "name": "ExerciseActivityType",
                      "title": "Type of activity",
                      "visibleIf": "{DoExercise} = true"
                    },
                    {
                      "type": "text",
                      "name": "ExerciseActivityFrequency",
                      "title": "How often?",
                      "visibleIf": "{DoExercise} = true"
                    },
                    {
                      "type": "text",
                      "name": "ExerciseActivityDuration",
                      "title": "How long per activity?",
                      "visibleIf": "{DoExercise} = true"
                    }
                  ]
                },
                {
                  "type": "panel",
                  "name": "children",
                  "elements": [
                    {
                      "type": "boolean",
                      "name": "HaveChildren",
                      "title": "Do you have children?"
                    },
                    {
                      "type": "text",
                      "name": "ChildrenNumber",
                      "title": "# of children",
                      "inputType": "number",
                      "visibleIf": "{HaveChildren} = true"
                    },
                    {
                      "type": "text",
                      "name": "ChildrenAges",
                      "title": "Their ages",
                      "visibleIf": "{HaveChildren} = true"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "SurgicalHistory",
      "title": "Surgical history / recent hospitalizations",
      "navigationTitle": "Surgical history",
      "elements": [
        {
          "type": "comment",
          "name": "SurgeryDescription",
          "title": "Date and type of surgery / procedure"
        }
      ]
    },
    {
      "name": "FamilyHistory",
      "title": "Family history",
      "navigationTitle": "Family history",
      "elements": [
        {
          "type": "matrixdynamic",
          "name": "FamilyHistory",
          "cellType": "text",
          "titleLocation": "hidden",
          "rowCount": 1,
          "columns": [
            {
              "name": "Relation"
            },
            {
              "name": "HealthConditions",
              "title": "Health conditions"
            },
            {
              "name": "CancerHistory",
              "title": "Family history of cancer"
            }
          ]
        }
      ]
    },
    {
      "name": "PreventiveCare",
      "title": "Preventive care",
      "navigationTitle": "Preventive care",
      "elements": [
        {
          "type": "panel",
          "name": "preventive-care",
          "elements": [
            {
              "type": "matrixdynamic",
              "name": "RecentShots",
              "title": "Recent shots from a doctor or pharmacist",
              "rowCount": 0,
              "columns": [
                {
                  "name": "Name",
                  "cellType": "dropdown",
                  "isRequired": true,
                  "choices": [
                    {
                      "value": "flu",
                      "text": "Flu"
                    },
                    {
                      "value": "shingles",
                      "text": "Shingles"
                    },
                    {
                      "value": "pneumonia",
                      "text": "Pneumonia"
                    },
                    {
                      "value": "tetanus",
                      "text": "Tetanus"
                    },
                    {
                      "value": "other",
                      "text": "Other"
                    }
                  ]
                },
                {
                  "name": "Date",
                  "cellType": "text",
                  "inputType": "date"
                },
                {
                  "name": "Place",
                  "cellType": "text"
                }
              ]
            },
            {
              "type": "matrixdynamic",
              "name": "RecentTests",
              "title": "Recent tests or procedures",
              "rowCount": 0,
              "columns": [
                {
                  "name": "Name",
                  "isRequired": true,
                  "cellType": "dropdown",
                  "choices": [
                    {
                      "value": "colonoscopy",
                      "text": "Colonoscopy"
                    },
                    {
                      "value": "cologuard",
                      "text": "Cologuard"
                    },
                    {
                      "value": "mammogram",
                      "text": "Mammogram"
                    },
                    {
                      "value": "pap",
                      "text": "PAP"
                    },
                    {
                      "value": "other",
                      "text": "Other"
                    }
                  ]
                },
                {
                  "name": "Date",
                  "cellType": "text",
                  "inputType": "date"
                },
                {
                  "name": "Place",
                  "cellType": "text"
                }
              ]
            },
            {
              "type": "matrixdynamic",
              "name": "Specialists",
              "cellType": "text",
              "columns": [
                {
                  "name": "Provider",
                  "title": "Provider's first and last name"
                },
                {
                  "name": "Speciality",
                  "title": "Speciality"
                },
                {
                  "name": "City",
                  "title": "Town/City"
                }
              ],
              "rowCount": 1
            },
            {
              "type": "matrixdynamic",
              "name": "Medications",
              "cellType": "text",
              "rowCount": 1,
              "columns": [
                {
                  "name": "Name"
                },
                {
                  "name": "Dose"
                },
                {
                  "name": "TimesPerDay",
                  "title": "Times per day"
                }
              ]
            },
            {
              "type": "matrixdynamic",
              "name": "Allergies",
              "cellType": "text",
              "rowCount": 1,
              "columns": [
                {
                  "name": "Type"
                },
                {
                  "name": "Reaction"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "Symptoms",
      "elements": [
        {
          "type": "tagbox",
          "name": "Symptoms",
          "title": "Please select any symptoms you have now or have had in the past month.",
          "choices": [
            "Fever",
            "Chills",
            "Feeling poorly",
            "Feeling tired",
            "Weight gain",
            "Weight loss",
            "Chest pain",
            "Heart pounding",
            "Fast pulse",
            "Slow pulse",
            "Leg pain with exercise",
            "Leg swelling",
            "Joint pain",
            "Neck pain",
            "Joint swelling",
            "Joint stiffness",
            "Muscle aches",
            "Back pain",
            "Sores",
            "Rash",
            "Itching",
            "Change in a mole",
            "Unusual growth/spot"
          ]
        },
        {
          "type": "text",
          "name": "CurrentDate",
          "title": "Today's date:",
          "titleLocation": "left",
          "inputType": "date",
          "defaultValueExpression": "today()"
        }
      ]
    }
  ],
  "showTOC": true,
  "completeText": "Submit",
  "showPreviewBeforeComplete": true,
  "widthMode": "static",
  "width": "1200px"
};
```

### `src/app/components/creator.component.ts`

```ts
import { Component, OnInit } from "@angular/core";
import { SurveyCreatorModel } from "survey-creator-core";
import "survey-core/survey.i18n";
import "survey-creator-core/survey-creator-core.i18n";
import { Serializer } from "survey-core";
import { ICreatorPlugin } from "survey-creator-core";
import { formJSON } from "./survey_json";
import "survey-core/survey-core.css";
import "survey-creator-core/survey-creator-core.css";

import SurveyTheme from "survey-core/themes";
import { registerCreatorTheme } from "survey-creator-core";

registerCreatorTheme(SurveyTheme); // Add predefined Survey Creator UI themes

// Add the `name` property to the survey and limit the length for question and column names
Serializer.addProperty("survey", {
    name: "name",
    maxLength: 50,
    isRequired: true,
    category: "general",
    visibleIndex: 0
});
Serializer.findProperty("question", "name").maxLength = 50;
Serializer.findProperty("matrixdropdown", "name").maxLength = 50;

class TabServerCodeCreatorPlugin implements ICreatorPlugin {
    constructor(private creator: SurveyCreatorModel) {
        this.model = creator;
        creator.addTab({
            name: "servercode",
            plugin: this,
            title: "Domain Model Code",
            index: 0
        });
    }
    public activate(): void { }
    public deactivate(): boolean {
        return true;
    }
    public model: SurveyCreatorModel;
}
@Component({
    // tslint:disable-next-line:component-selector
    selector: "component-survey-creator",
    templateUrl: "./creator.component.html",
    styleUrls: ["./creator.component.css"]
})
export class SurveyCreatorComponent implements OnInit {
    model: SurveyCreatorModel;
    ngOnInit() {
        const creator = new SurveyCreatorModel();
        new TabServerCodeCreatorPlugin(creator);
        creator.JSON = formJSON;
        this.model = creator;
    }
}
```

### `src/app/app.component.html`

```html
<component-survey-creator></component-survey-creator>
```

### `src/app/app.component.ts`

```ts
import { Component } from "@angular/core";

@Component({
    selector: "app-root",
    templateUrl: "./app.component.html"
})
export class AppComponent {
    title = "CodeSandbox";
}
```

### `src/app/app.module.ts`

```ts
import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from "@angular/core";
import { AppComponent } from "./app.component";
import { SurveyCreatorModule } from "survey-creator-angular";
import { SurveyCreatorComponent } from "./components/creator.component";
import { TabServerCodeComponent } from "./components/servercode.component";

@NgModule({
    declarations: [AppComponent, SurveyCreatorComponent, TabServerCodeComponent],
    imports: [BrowserModule, SurveyCreatorModule],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }
```

### `src/environments/environment.prod.ts`

```ts
export const environment = {
    production: true
};
```

### `src/environments/environment.ts`

```ts
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angular-cli.json`.

export const environment = {
    production: false
};
```

### `src/index.html`

```html
<app-root></app-root>
```

### `src/main.ts`

```ts
import { enableProdMode } from "@angular/core";
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";

import { AppModule } from "./app/app.module";
import { environment } from "./environments/environment";

if (environment.production) {
    enableProdMode();
}

platformBrowserDynamic()
    .bootstrapModule(AppModule)
    .catch(err => console.log(err));
```

### `src/polyfills.ts`

```ts
/**
 * This file includes polyfills needed by Angular and is loaded before the app.
 * You can add your own extra polyfills to this file.
 *
 * This file is divided into 2 sections:
 *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
 *   2. Application imports. Files imported after ZoneJS that should be loaded before your main
 *      file.
 *
 * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
 * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
 * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
 *
 * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
 */

/***************************************************************************************************
 * BROWSER POLYFILLS
 */

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js';  // Run `npm install classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';

/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import "core-js/proposals/reflect-metadata";

/**
 * Required to support Web Animations `@angular/platform-browser/animations`.
 * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
 **/
// import 'web-animations-js';  // Run `npm install web-animations-js`.

/***************************************************************************************************
 * Zone JS is required by default for Angular itself.
 */
import "zone.js/dist/zone"; // Included with Angular CLI.

/***************************************************************************************************
 * APPLICATION IMPORTS
 */
```

### `src/styles.css`

```css
/* You can add global styles to this file and import other style files */
```

### `src/typings.d.ts`

```ts
/* SystemJS module definition */
declare var module: NodeModule;
interface NodeModule {
    id: string;
}
```

### `.angular-cli.json`

```json
{
  "apps": [
    {
      "root": "src",
      "outDir": "dist",
      "assets": [ "assets", "favicon.ico" ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "prefix": "app",
      "styles": [ "styles.css"  ],
      "scripts": [  ],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    }
  ]
}
```

### `_tsconfig.json`

```json
{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "allowSyntheticDefaultImports": true,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "resolveJsonModule": true,
    "target": "es2015",
    "module": "es2020",
    "lib": [
      "es2018",
      "dom"
    ]
  }
}
```

### `package.json`

```json
{
  "name": "surveyjs-angular",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "14.1.1",
    "@angular/cdk": "14.1.1",
    "@angular/common": "14.1.1",
    "@angular/compiler": "14.1.1",
    "@angular/core": "14.1.1",
    "@angular/forms": "14.1.1",
    "@angular/platform-browser": "14.1.1",
    "@angular/platform-browser-dynamic": "14.1.1",
    "@angular/router": "14.1.1",
    "core-js": "3.6.4",
    "rxjs": "6.5.4",
    "survey-angular-ui": "latest",
    "survey-creator-core": "latest",
    "survey-core": "latest",
    "survey-creator-angular": "latest",
    "tslib": "1.13.0",
    "zone.js": "0.11.7"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~13.0.0",
    "@angular/cli": "~13.0.0",
    "@types/jasmine": "3.6.3",
    "@types/jasminewd2": "2.0.8",
    "@types/node": "14.14.28",
    "codelyzer": "6.0.1",
    "jasmine-core": "3.6.0",
    "jasmine-spec-reporter": "6.0.0",
    "karma": "6.1.1",
    "karma-chrome-launcher": "3.1.0",
    "karma-coverage-istanbul-reporter": "3.0.3",
    "karma-jasmine": "4.0.1",
    "karma-jasmine-html-reporter": "1.5.4",
    "protractor": "7.0.0",
    "ts-node": "9.1.1",
    "tslint": "~6.1.3",
    "typescript": "4.1.5"
  },
  "keywords": [ "angular", "surveyjs" ],
  "description": "SurveyJS-Angular example project"
}
```

## Other Frameworks

- [React](https://surveyjs.io/survey-creator/examples/create-domain-models/reactjs.md)
- [Vue 3](https://surveyjs.io/survey-creator/examples/create-domain-models/vue3js.md)
- [jQuery](https://surveyjs.io/survey-creator/examples/create-domain-models/jquery.md)
- [Vanilla JS](https://surveyjs.io/survey-creator/examples/create-domain-models/vanillajs.md)
