InterviewSolution
| 1. |
Describe the project structure of an Ionic 4 application. |
|
Answer» The structure of an Ionic 4 application is identical to that of an Angular application. The root directory will contain the e2e, node modules, and src folders, as well as INDIVIDUAL files such as angular.json, ionic.config.json, package-lock.json, package.json, tsconfig.json, and tslint.json. The e2e/ folder CONTAINS files for running end to end integration tests, while node modules contain all dependencies. The majority of the application code you'll be BUILDING is in the src/app/ subdirectory. App.module.ts, app.component.ts, app.component.html, app.component.spec.ts, and app-routing.module.ts are the main files in the application folder. Any developed services, components, or pages can be saved in their own directories. Images and other static content can be stored in the assets/ subdirectory. Angular.json contains all of the angular settings, such as the PROJECT NAME, application folder root path, source root, paths for index file, main.ts, polyfills, assets folder path, css stylesheet paths, script paths, build settings, and so on. During development, ionic.config.json can be used to set proxy settings for APIs to avoid CORS problems. package.json provides a list of dependencies as well as the commands serve, build, test, and e2e. |
|