1. main.ts is starting point of angular application
  2. main.ts refers to app.module.ts which tells the components to be considered during bootstrap
  3. the component by default would be AppComponent which loads the app.component.html
  4. index.html is the root html file which loads the whole app in broswer.When you inspect index.html it would have the same code as one in editor showing loading. The JS files would replace the content in index.html once it gets loaded.Its the same js file which gets generated during ng build placed in dist folder
  5. All components newly added should be registered in app.module.ts. This file is like registry which would help angular to keep track of components
main.ts -> app.module.ts -> Check for bootstrap component
ng serve Loads the project in server
ng test Carries out unit testing.
karma.config.js – defines configuration of test runner
ng lint Checks for violation in coding standard. Checks whether it conforms to standard as defined in tslint.json
ng build creates dist folder in project. dist folder contains js files generated from ts files. The dist folder could be copied and added along with java app and deployed in web server for supporting front end. dist folder is one deployed at end of development I prod
ng e2e much more than unit test. It works by launching angular application in a headless chrome browser. The test are defined in e2e folder
ng new PROJECT_NAME –no-strict creates a new angular project mostly for Development You can toggle by setting strict:false in tsconfig.json
ng new PROJECT_NAME creates a new angular project
ng generate component COMPONENT_NAME generates a new component with component name
ng generate class models/CLASS_NAME generates a class in models folder
ng generate service SERVICE_NAME generates a service
Files and Folders Comments
src->app contains actual project code
dist Contains final distributable js file generated as result of ng build
e2e Contains script for end to end testing
environments Contains the details specific to environment
tsconfig.json code written in ts should be converted to js to get interpretted by browser. This would be configured in tsconfig,json
package.json frameworks and packages needs to execute ng command are defined here
src->main.ts, index.html Responsible for bootstrapping angular application
polyfills.ts take care of browser incompatibility
style.css specifies global application style
test.ts starting point for running unit test
app-routing.module.ts file where all routes are defined