3) Folder Structure of Project

1) e2e: This contains end to end testing of application. Which can contain user simulation on the application
2)node modules:
  • This is where we store all 3rd party libraries that the application may depend upon. This is completely for development and contains libraries in a bundle. We do not deploy this bundle to server.
3)src:
  • This is where we actually have the source code. Inside this we have
  • 3.1) app folder: Which have module and components. Every application will atleast have one module and one component
  • 3.2) assets: This is where we have static assets of the project. Say if we have any text files, images, icon they go under this folder.
  • 3.3)environments: This is where we store configurations settings of different environments. One for production one for development.
  • 3.4) favicon.ico: icon displayed in browser
  • 3.5) index.html: Which is simple html file which contains our angular application. We do not have any reference to angular script or style sheet. They will be inserted dynamically while working
  • 3.6) main.ts: It is a typescript file. This is the starting point of our application. It is similar to main method in other programming languages. We are bootstrapping main module in our application
  • 3.7) polyfills.ts: This basically imports scripts that are required running angular. Because angular uses some features of javascript that are not available in current version of JS supported by most versions of browsers. So this polyfills will fill the gap features needed by angular needs with features needed by browser
  • 3.8) styles.css: Global styles of application are added. Also, each page and component can have its own css.
  • 3.9) test.ts: used in testing environment 
4) .angular-cli.json: We have configuration file for angular cli  
5) .editor.config: If we are working in a team environment then we need to make all developers in team have same these editor settings in their editors
6) .gitignore
7) karma.conf.js: It is used as test runner for JS
8) package.json: We will have all dependencies that libraries listed here they start with @angular followed by library name
                       
And we also have dependencies which are needed only for development and not for production
9)protractor.conf.js: It is tool to run end to end test for angular
10) ts.config: this contains settings for typescript compiler. So typescript compiler looks at this settings and based upon these settings it will compile your code into JS that browsers can understand. 
11) tslint.json: tslint is a static analysis tool fot typescript code . So it checks your typescript code for readability, maintainability and functionality errors.



No comments:

Post a Comment

1) Install and Run

Go to  https://nodejs.org/en/  and install the latest stable version. Run the download and install it Once installation is done, go to comma...