Angular Template for MarsBased projects.
The recommended way to use it is cloning it from the Github repository and start your project from there.
git clone https://github.com/MarsBased/pathfinder-angular
This project was generated with Angular CLI
Run yarn start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run yarn build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run yarn test
to execute the unit tests via Karma.
Run yarn e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via yarn start
.
Run yarn lint
to execute linter.
pathfinder-angular is shipped with some sample pages to help you build a full project. Use them as a guide, you can consider a different structure.
We strongly recommend to follow the official [Angular Style Guide] (https://angular.io/guide/styleguide) published.
Following the Folders-by-feature structure principle we placed pages under src/pages folder. Each component has its own html, ts, spec and scss (when needed)
Environment configuration is located in src/environments
folder. You can create as many as you need. Remember to add the new environment to .angular-cli.json
file.
The file contents for the current environment will overwrite environment.ts
content during the build.
The build system defaults to the dev environment which uses environment.ts
,
But if you do ng build --env=prod
then environment.prod.ts
will be used instead.
The list of which env maps to which file can be found in .angular-cli.json
.
There are some existing tasks like yarn build
or yarn build:prod
with predefined targets and environments.
Language assets are under assets/i18n
folder. If you need to support more languages you will need to place here a new language file and edit the list of supported languages in the app.config.ts
file.
The app.config.ts
file is the application configuration file that you can access during runtime, here you can define default and supported languages.