Hybrid Mobile POS Application, based on Ionic 4 & Angular 8
Hybrid Mobile POS Application, based on Ionic 4 & Angular 8
Create new project on the Firebase Console
Open /src/environments/environment.ts
and add your Firebase configuration.
export const environment = {
production: false,
firebaseConfig: {
apiKey: '<your-key>',
authDomain: '<your-project-authdomain>',
databaseURL: '<your-database-URL>',
projectId: '<your-project-id>',
storageBucket: '<your-storage-bucket>',
messagingSenderId: '<your-messaging-sender-id>',
appId: '<your-app-id>',
measurementId: '<your-measurement-id>'
}
};
The project use ngx-translate library for translation. See an example at here https://stackblitz.com/github/ngx-translate/example
src/app/app.config.js
and add your new app language (ex. French ) to array SUPPORTED_LANGUAGESexport const SUPPORTED_LANGUAGES: SupportedLanguage[] = [
...
{
lang: 'fr',
locale: 'fr-FR',
name: __('French'),
currency: {
symbol: "€",
name: "Euro",
symbol_native: "€",
decimal_digits: 2,
rounding: 0,
code: "EUR",
name_plural: "Euro",
formatter: {
is_symbol_prefix: false,
delimiters: ' |,',
space_between: true
} as any
}
];
packages.json
, add new translation file inside {…} ...
"scripts": {
...
"extract": "ngx-translate-extract --input ./src --output ./src/assets/i18n/{en,vi,fr}.json --clean --format json"
},
...
You can now run npm run extract
and it will extract strings from your project.
Open Terminal and go to project root path
$ npm install
$ ionic serve
Plug in your Android phone into your PC
$ ionic codrova run android
platforms/android
directory.$ ionic cordova prepare ios
platforms/ios
directory.