Skip to content
Snippets Groups Projects
Commit 24fe505f authored by ncastejon's avatar ncastejon
Browse files

Fix issue on dataset page: no 404 redirect if http call for parent or children datasets fail.

parent 2a3c2376
No related branches found
No related tags found
1 merge request!41Version 2.1.7
Pipeline #1676 passed
[![pipeline status](https://gitlab.alpha.grandlyon.com/refonte-data/portail-data/badges/master/pipeline.svg)](https://gitlab.alpha.grandlyon.com/refonte-data/portail-data/commits/master) [![pipeline status](https://gitlab.alpha.grandlyon.com/refonte-data/portail-data/badges/master/pipeline.svg)](https://gitlab.alpha.grandlyon.com/refonte-data/portail-data/commits/development)
## Requirements
### Node.js
For this project the version of node.js used is [v8.10.0](https://nodejs.org/dist/v8.10.0/) (all downloadable links)
### NPM
In order to update npm version to the latest run the following command
`npm install npm@latest -g`
### Angular CLI
Download and install globally the [Angular CLI](https://cli.angular.io/)
`npm install -g @angular/cli@1.7.3`
### Loopback
Install [Loopback](https://loopback.io/) using the following command:
`npm install -g loopback-cli@4.1.0`
### Fireloop
Install [Fireloop](https://github.com/mean-expert-official/fireloop.io):
`npm install -g @mean-expert/fireloop@1.0.0-beta.2.7`
## Initializing a new project
`fireloop`
The first time it will geerate the Loopback server.
`fireloop`
The second time it will generate the angular project
## Installing Angular Material (if you want to use material)
[HowTo](https://material.angular.io/guide/getting-started)
Step 1 and 2, Step 3 is a little different as we create a specific module that import every components we need from Material
## Configure Angular to use scss
### When generating project
`ng new my-app --style=scss`
### When project already exists
`ng set defaults.styleExt scss`
then modify every extension .css to .scss
## Use Bootstrap Grid
Download the [Boostrap sources](https://getbootstrap.com/docs/4.0/getting-started/download/#source-files) (not compiled files).
Create a "scss" folder at /src/. Put the Boostrap sources inside it
Clean what you don't need: keep bootstrap-grid.scss with the files & folders imported:
@import "functions";
@import "variables";
@import "mixins/breakpoints";
@import "mixins/grid-framework";
@import "mixins/grid";
@import "grid";
@import "utilities/display";
@import "utilities/flex";
Import the bootrap-grid.scss in your style.scss as following:
`@import '~scss/bootstrap-grid.scss';`
## Webapp
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.3.
### Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
### Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
### Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
### Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
### Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
### Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
### Build Angular project with AOT option (i18n purpose)
### https://medium.com/@feloy/deploying-an-i18n-angular-app-with-angular-cli-fc788f17e358
for lang in es en fr; do \
ng build --output-path=dist/$lang
--aot
(-prod \)
--bh /$lang/
--i18n-file=src/i18n/messages.$lang.xlf
--i18n-format=xlf
--locale=$lang;
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment