{"id":20504872,"url":"https://github.com/nfriaa/ionic-tutorial1","last_synced_at":"2026-04-10T02:53:03.452Z","repository":{"id":201889844,"uuid":"110446835","full_name":"nfriaa/ionic-tutorial1","owner":"nfriaa","description":"Ionic tutorial1 : \"getting started\" présentation de quelques fonctionnalités de base","archived":false,"fork":false,"pushed_at":"2017-11-13T15:33:42.000Z","size":100,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T07:55:45.836Z","etag":null,"topics":["android","angular","ionic","ionic-framework","ios","node","npm","vscode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nfriaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-11-12T16:05:19.000Z","updated_at":"2018-02-12T11:18:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c91ffb0-7042-44a6-b7eb-1cf9163994ce","html_url":"https://github.com/nfriaa/ionic-tutorial1","commit_stats":null,"previous_names":["nfriaa/ionic-tutorial1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfriaa%2Fionic-tutorial1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfriaa%2Fionic-tutorial1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfriaa%2Fionic-tutorial1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfriaa%2Fionic-tutorial1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfriaa","download_url":"https://codeload.github.com/nfriaa/ionic-tutorial1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242102733,"owners_count":20072133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","angular","ionic","ionic-framework","ios","node","npm","vscode"],"created_at":"2024-11-15T19:40:58.228Z","updated_at":"2025-10-12T18:45:23.173Z","avatar_url":"https://github.com/nfriaa.png","language":"TypeScript","readme":"# ionic-tutorial1\nIonic tutorial1 : \"getting started\" présentation de quelques fonctionnalités de base\n\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg?style=flat)](https://github.com/nfriaa/ionic-tutorial1/issues) [![Travis](https://img.shields.io/travis/rust-lang/rust.svg)](https://github.com/nfriaa/ionic-tutorial1) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/nfriaa/ionic-tutorial1/blob/master/LICENSE)\n\n![](https://img.shields.io/badge/node-8-red.svg)\n![](https://img.shields.io/badge/npm-5-blue.svg)\n![](https://img.shields.io/badge/ionic-3-ff69b4.svg)\n![](https://img.shields.io/badge/angular-5-orange.svg)\n![](https://img.shields.io/badge/typescript-latest-green.svg)\n![](https://img.shields.io/badge/editor-vscode-yellow.svg)\n\n## Tester cette application en local\n```sh\ngit clone https://github.com/nfriaa/ionic-tutorial1.git\ncd ionic-tutorial1\nnpm install\nionic serve\n```\n\n## Créer une nouvelle application ionic\n```sh\nionic start ionic-tutorial1 sidemenu\n```\nPlusieurs autres templates sont disponibles pour créer un nouveau projet (tabs : pour une application basée sur les onglets, blank, super ou tutorial)\n\n## Démarrer l'application et tester dans un navigateur\n```sh\ncd ionic-tutorial1\nionic serve\n```\nCette instruction ouvre une page `http://localhost:8100/` dans le navigateur dans la quelle on peut tester le fonctionnement de notre application.\n\n## Ajouter une nouvelle page Exemple1\nPour ajouter une nouvelle page on va utiliser Ionic CLI :\n```sh\nionic generate page Exemple1\n```\nCette commande va générer les fichiers pour la page Exemple1 :\n```diff\n+ src/pages/exemple1/exemple1.ts\n+ src/pages/exemple1/exemple1.module.ts\n+ src/pages/exemple1/exemple1.scss\n+ src/pages/exemple1/exemple1.html\n```\nIl faut maintenant l'ajouter au Menu principale de l'application. Voilà les changements à faire : \n\n- Fichier `src/app/app.module.ts`\n```ts\n// ajouter l'import :\nimport { Exemple1Page } from './../pages/exemple1/exemple1';\n\n// le tableau declarations :\ndeclarations: [\n    ... ,\n    Exemple1Page\n  ]\n\n// le tableau entryComponents :\nentryComponents: [\n    ... ,\n    Exemple1Page\n  ]  \n```\n- Fichier `src/app/app.component.ts`\n```ts\n// ajouter l'import :\nimport { Exemple1Page } from './../pages/exemple1/exemple1';\n\n// le tableau this.pages :\nthis.pages = [\n      ... ,\n      { title: 'Exemple1', component: Exemple1Page }\n    ];\n```\nEt voilà ! \n\n## Exemple 2 : listes\n- Ajouter une nouvelle page à l'aide d'Ionic CLI :\n```sh\nionic generate page Exemple1\n```\n- Puis déclarer cette nouvelle page dans les fichiers `src/app/app.module.ts` et `src/app/app.component.ts`.\n- Ensuite dans le fichier `src/pages/exemple2/exemple2.html` ajouter :\n```html\n\u003cion-list \u003e\n    \u003cbutton ion-item *ngFor=\"let item of items\"\u003e\n      {{item.title}}\n    \u003c/button\u003e\n\u003c/ion-list\u003e \n```\n- Il faut maintneant déclarer et initialiser le tableau items dans le fichier `src/pages/exemple2/exemple2.ts` :\n```ts\n// dans la partie 'attributs' de la classe :\nitems: Array\u003c{ title: string }\u003e;\n\n// dans le constructeur :\nthis.items = [];\nthis.items.push({ title: \"DD\" });\nthis.items.push({ title: \"EE\" });\nthis.items.push({ title: \"FF\" });\nthis.items.push({ title: \"GG\" });\n```\n\nD'autres exemples sont présents dans cette application : afficher une alerte si on clic sur un item, ou afficher une autre page, afficher une note dans la console, tableau d'objets ...etc. ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfriaa%2Fionic-tutorial1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfriaa%2Fionic-tutorial1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfriaa%2Fionic-tutorial1/lists"}