|
|
|
|
|
https://ionicframework.com/
|
|
|
##prérequis
|
|
|
`
|
|
|
node --version
|
|
|
npm --version
|
|
|
sudo apt install npm
|
|
|
npm install -g @ionic/cli
|
|
|
`
|
|
|
|
|
|
[optionnel] Upgrade node version (version 10 installée, besoin de la 12 minimum pour capacitor)
|
|
|
le paquet n permet de gérer les versions de node
|
|
|
`
|
|
|
sudo npm install -g n
|
|
|
sudo n current // dernière version stable
|
|
|
`
|
|
|
|
|
|
## installation de ionic
|
|
|
`
|
|
|
ionic start
|
|
|
|
|
|
? Use the app creation wizard? (Y/n)
|
|
|
n
|
|
|
|
|
|
Framework: (Use arrow keys)
|
|
|
❯ Angular | https://angular.io
|
|
|
React | https://reactjs.org
|
|
|
Vue | https://vuejs.org
|
|
|
Angular
|
|
|
|
|
|
? Project name:
|
|
|
<your name> = elabTest
|
|
|
|
|
|
? Starter template:
|
|
|
tabs | A starting project with a simple tabbed interface
|
|
|
sidemenu | A starting project with a side menu with navigation in the content area
|
|
|
❯ blank | A blank starter project
|
|
|
list | A starting project with a list
|
|
|
my-first-app | An example application that builds a camera with gallery
|
|
|
conference | A kitchen-sink application that shows off all Ionic has to offer
|
|
|
blank
|
|
|
|
|
|
`
|
|
|
|
|
|
`
|
|
|
cd elabTest/
|
|
|
ionic serve
|
|
|
`
|
|
|
|
|
|
https://ionicframework.com/docs/angular/your-first-app
|
|
|
|
|
|
-----------
|
|
|
Problème
|
|
|
la politique « Same Origin » ne permet pas de consulter la ressource distante située sur https://canular.inrae.fr/api/v1/experiments/6. Raison : l’en-tête CORS « Access-Control-Allow-Origin » est manquant. Code d’état : 400
|
|
|
|
|
|
|
|
|
sur le serveur
|
|
|
sudo a2enmod headers |
|
|
\ No newline at end of file |