An Angle 4 project in eclipse has the following folder structure:
node_modules (where the node.js libraries are)
src (where all the source code files are)
"loose" files (here are some important files, such as package.json, tsconfig.json, tslint.json)
Inside the src folder, we have the following structure:
app (where all the components Angular will use)
assets (images, icons, everything stays here)
environments (production / development environment configuration files)
Within the folder src
, there are files like favicon, index.html which is the basis of the project (here are the head and body tags of the application!).
Here, too, is the webconfig.xml
to make the settings when doing a ZipDeploy in Azure, for example.
When it comes to making a module, you make two files, <modulo>-routing.ts
and <modulo>-module.ts
. Routing does the routing of the module and the module is the definition of the module itself, such as imports, declarations and providers.
When it comes to components, you must have a .ts file to define it, and you can put all the HTML and CSS inside that file, doing the following:
@Component({
selector: 'app-department',
template: '<código HTML aqui>',
styles: '<código CSS aqui>'
})
Or with external files, like this:
@Component({
selector: 'app-department',
templateUrl: './department.component.html',
styleUrls: [
'./department.component.css',
'../../app.component.css'
]
})
And there are still other properties to use in the components, which you can check in the Angle 4 API page .