A ionic style angularjs directive to display a info bar in the page header.
bower install ionic-infobar
Install withbower
Include the ionic.infobar
module into your app
app.module('myApp', ['ionic.infobar'])
In your template
<info-bar info="info" ng-if="info.isShown"></info-bar>
In your controller
myApp.controller('myCtrl', function ($scope, infoBarService) {
$scope.info = infoBarService
// show infobar
infoBarService.show('some content', 4000)
// show with type
infoBarservice.show('oops, there is an error', 4000, 'bar-light')
// hide infobar
infoBarService.hide()
})
Options:
- Type:
bar-light
,bar-stable
,bar-positive
,bar-calm
,bar-balanced
,bar-energized
,bar-assertive
,bar-royal
,bar-dark
Or check the example folder
npm install
Install coffeescript and uglifymake all
Build js file and compress
MIT