{"id":18614985,"url":"https://github.com/andrewjbateman/ionic-angular-horiznav","last_synced_at":"2026-04-13T22:31:34.976Z","repository":{"id":39244169,"uuid":"237060060","full_name":"AndrewJBateman/ionic-angular-horiznav","owner":"AndrewJBateman","description":":clipboard: Ionic tutorial app to switch from tabs to top nav as screen size increases","archived":false,"fork":false,"pushed_at":"2023-02-03T05:13:13.000Z","size":1756,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T01:34:28.480Z","etag":null,"topics":["angular","angular15","html","ionic","ionic-page","ionic6","navigation","navigation-drawer","observables","rxjs","rxjs7","scss"],"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/AndrewJBateman.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-29T19:04:05.000Z","updated_at":"2023-01-09T08:46:55.000Z","dependencies_parsed_at":"2023-02-15T12:01:00.546Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/ionic-angular-horiznav","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/ionic-angular-horiznav","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-horiznav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-horiznav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-horiznav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-horiznav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/ionic-angular-horiznav/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-horiznav/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31773979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["angular","angular15","html","ionic","ionic-page","ionic6","navigation","navigation-drawer","observables","rxjs","rxjs7","scss"],"created_at":"2024-11-07T03:27:43.891Z","updated_at":"2026-04-13T22:31:34.954Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: Ionic Horizontal Navigation\n\n* Ionic-Angular tutorial app to switch from tabs to top nav bar as screen size increases\n* Tutorial code from [Simon Grimm at Devdactic](https://devdactic.com/) - see [:clap: Inspiration](#clap-inspiration) below\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/ionic-angular-horiznav?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/ionic-angular-horiznav?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/ionic-angular-horiznav?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/ionic-angular-horiznav?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Ionic Horizontal Navigation](#zap-ionic-horizontal-navigation)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-do list](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Uses a simple screensize service with a BehaviourSubject that is used in app.component and subscribed to in the tabs page. So when the screen size exceeds 568px then a boolean 'isDesktop' observable changes state. This is used in the tabs page to change the bottom tabs toolbar to a top nav bar using the Angular *ngIf=\"isDesktop'.\n* Note: screen reloads when going from PC to phone size - due to an issue with the tabs routing.\n\n## :camera: Screenshots\n\n![Ionic page](./img/pc.png)\n![Ionic page](./img/phone.png)\n\n## :signal_strength: Technologies\n\n* [Ionic v6](https://ionicframework.com/)\n* [Angular v15](https://angular.io/)\n* [Ionic/angular v6](https://www.npmjs.com/package/@ionic/angular) including [ion-nav-link](https://ionicframework.com/docs/api/nav-link)\n\n## :floppy_disk: Setup\n\n* `npm i` to install dependencies\n* `ionic serve` to start the server on _localhost://8100_\n\n## :computer: Code Examples\n\n* service to change state of an observable when screen size hits a breakpoint of 568px.\n\n```typescript\nexport class ScreensizeService {\n\n  private isDesktop = new BehaviorSubject\u003cboolean\u003e(false);\n\n  constructor() { }\n\n  onResize(size: number) {\n    if (size \u003c 568) {\n      this.isDesktop.next(false);\n    } else {\n      this.isDesktop.next(true);\n    }\n  }\n\n  isDesktopView(): Observable\u003cboolean\u003e {\n    console.log('state of isDesktop boolean is:', this.isDesktop.value);\n    return this.isDesktop.asObservable().pipe(distinctUntilChanged());\n  }\n}\n```\n\n## :cool: Features\n\n* Uses the RxJS [distinctUntilChanged](https://www.learnrxjs.io/learn-rxjs/operators/filtering/distinctuntilchanged) to only emit an observable change of state when it is actually different.\n\n## :clipboard: Status \u0026 To-do list\n\n* Status: Working\n* To-do: nothing. Could use this in other Ionic apps.\n\n## :clap: Inspiration\n\n* [Simon Grimm, Ionic Academy Tutorial: How to Create a Horizontal Navigation for Ionic Desktop Views](https://devdactic.com/horizontal-navigation-ionic-desktop/)\n\n## :file_folder: License\n\n* This project is licensed under the terms of the MIT license.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fionic-angular-horiznav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fionic-angular-horiznav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fionic-angular-horiznav/lists"}