{"id":15155475,"url":"https://github.com/bpierre/ng-navigation-bar","last_synced_at":"2025-09-30T03:31:23.002Z","repository":{"id":13491032,"uuid":"16181538","full_name":"bpierre/ng-navigation-bar","owner":"bpierre","description":"AngularJS module: navigation bar for touch interfaces","archived":true,"fork":false,"pushed_at":"2014-01-29T15:55:30.000Z","size":522,"stargazers_count":23,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-15T02:56:06.950Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","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/bpierre.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}},"created_at":"2014-01-23T18:35:36.000Z","updated_at":"2023-05-08T07:52:41.000Z","dependencies_parsed_at":"2022-09-04T05:23:28.793Z","dependency_job_id":null,"html_url":"https://github.com/bpierre/ng-navigation-bar","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpierre%2Fng-navigation-bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpierre%2Fng-navigation-bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpierre%2Fng-navigation-bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bpierre%2Fng-navigation-bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bpierre","download_url":"https://codeload.github.com/bpierre/ng-navigation-bar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234695770,"owners_count":18873032,"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":[],"created_at":"2024-09-26T18:22:08.269Z","updated_at":"2025-09-30T03:31:17.685Z","avatar_url":"https://github.com/bpierre.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng-navigation-bar\n\n![demonstration](demo.gif)\n\n## npm installation\n\n```shell\n$ npm install ng-navigation-bar\n```\n\n## Usage\n\n### Load the Angular Module\n\nIf you are using Browserify, you just need to `require()` the module:\n\n```javascript\nvar navbar = require('ng-navigation-bar');\n```\n\nOtherwise, you can load `dist/navigation-bar.js` in your HTML:\n\n```html\n\u003cscript src=\"ng-navigation-bar/dist/navigation-bar.js\"\u003e\u003c/script\u003e\n```\n\nThen, add `'navigationBar'` to your app requirements:\n\n```javascript\nvar app = angular.module('app', ['navigationBar']);\n```\n\n### Add the Styles\n\nIf you are using [Stylus](http://learnboost.github.io/stylus/) (and you\nshould!), you can require the Stylus module, which will allows you to define\nsome parameters:\n\n```stylus\n// Each parameter is optional\nnavbar-title-color = rgb(0, 0, 0) // Title color\nnavbar-button-color = rgb(21, 125, 251) // Buttons color\nnavbar-anim-duration = 0.6s // Animation duration\nnavbar-timing-function = cubic-bezier(.1, .7, .1, 1) // Animation easing\n\n// Make sure that you define the parameters before the @import\n@import 'ng-navigation-bar'\n```\n\nIf you are not using Stylus, load `dist/navigation-bar.css` into your app, and\nhave a look inside it if you need to change animation settings.\n\n### Use the `navigation-bar` directive\n\nAdd a `navigation-bar` element into your template, and a `status` attribute on\nit, which is an object containing the following properties:\n\n- title: the current title (`String`)\n- backLabel: the “Back” button label (optional, `String`)\n- actionLabel: the “Action” button label (optional, `String`)\n- onBack: the function to call when the “Back” button is clicked (`Function`)\n- onAction: the function to call when the “Action” button is clicked (`Function`)\n- move: the current animation, left-to-right or right-to-left ('ltr', 'rtl' or 'none', `String`)\n\n## Example\n\n```javascript\nrequire('ng-navigation-bar'); // Only with Browserify\n\nvar app = angular.module('app', ['navigationBar']);\n\napp.controller('MyCtrl', function($scope) {\n\n  var baseStatus = {\n    backLabel: 'Back',\n    actionLabel: 'Next',\n    onBack: function() {\n      var newIndex = statuses.indexOf($scope.status) - 1;\n      if (newIndex \u003e -1) {\n        $scope.status = statuses[newIndex];\n        $scope.status.move = 'ltr';\n        $scope.navigationBarStatus = $scope.status;\n      }\n    },\n    onAction: function() {\n      var newIndex = statuses.indexOf($scope.status) + 1;\n      if (newIndex \u003c statuses.length) {\n        $scope.status = statuses[newIndex];\n        $scope.status.move = 'rtl';\n        $scope.navigationBarStatus = $scope.status;\n      }\n    }\n  };\n\n  var statuses = [\n    angular.extend({title: 'Screen 1'}, baseStatus),\n    angular.extend({title: 'Screen 2'}, baseStatus),\n    angular.extend({title: 'Screen 3'}, baseStatus)\n  ];\n\n  $scope.status = statuses[0];\n});\n```\n\n```html\n\u003cbody ng-app=\"app\"\u003e\n  \u003cdiv ng-controller=\"MyCtrl\"\u003e\n    \u003cnavigation-bar status=\"status\"\u003e\u003c/navigation-bar\u003e\n  \u003c/div\u003e\n\u003c/body\u003e\n```\n\n## License\n\n[MIT](http://pierre.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpierre%2Fng-navigation-bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbpierre%2Fng-navigation-bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbpierre%2Fng-navigation-bar/lists"}