ng-horizontal-timeline

0.1.0 • Public • Published

ng-horizontal-timeline

AngularJS component to help create a horizontal timeline with css animations.

Usage

  • Add it to your module
angular
  .module('myModule', ['ng-horizontal-timeline']) //import the component module
  .controller('myController', ['$log', function($log) {
    var vm = this;
    $log.debug('Hello world!');
    vm.events = [
      {
        text: 'test1'
      },
      {
        text: "test2"
      }
    ];
    
    vm.index = 2;
    
    vm.logClickEvent = function() {
      $log.debug('Event clicked: ', vm.events[vm.index]);
    };
    
    return vm;
  }]);
  • Add the component to your template
<!DOCTYPE html>
<html ng-app="myModule" ng-strict-di>
<body ng-controller="myController as vm">
 
<h-timeline events="vm.events" event-click="vm.logClickEvent()" selected-index="vm.index"></h-timeline>
 
</body>
</html>

Package Sidebar

Install

npm i ng-horizontal-timeline

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • bludata
  • zote
  • johnnyasantoss