InterviewSolution
| 1. |
Describe the Project structure of an Ionic 4 app. |
|
Answer» Ionic 4 app has a structure similar to an angular application. e2e , node_modules, src folders will be present in root DIRECTORY along with individual FILES like angular.json, ionic.config.json, package-lock.json, package.json, tsconfig.json, tslint.json . e2e/ folder has files for running end to end integration tests, node_modules contains all the dependencies. src/app/ folder contains most of the app code that you will be writing. App folder essentially has app.module.ts, app.component.ts, app.component.html, app.component.spec.ts and app-routing.module.ts. any services, COMPONENTS, pages created can be stored in their respective folders. assets/ folder can be used to store images and other static content. As its name suggests, angular.json hosts all of the angular settings like project name, root path for app folder, source root, PATHS for index file, main.ts, polyfills, assets folder path, css stylesheet paths, script paths, build settings etc. ionic.config.json can be used to set proxy settings for API to avoid CORS errors during development. package.json contains a list of dependencies and serve , build , test and e2e commands. |
|