0.1.1 • Published 8 years ago

angular-gm-trip v0.1.1

Weekly downloads
9
License
-
Repository
github
Last release
8 years ago

Angular wrapper for Trip.js

Example:

ng.controller('MyController', function ($trip, $log) {

    const setupTrip = () => {
        return $trip.$new(
            // blocks
            [
                {
                    sel: '#someId',
                    content: 'Hello',
                    position: $trip.PositionEnum.Bottom
                },
                {
                    sel: '#anotherId',
                    content: 'World',
                    position: $trip.PositionEnum.Top
                }
            ],
            // options
            {
                onEnd: () => {
                    $log.info('trip is ended');
                }
            }
        );
    };

    this.$onInit = () => {
        const trip = setupTrip();
        trip.start();
    });

});

License

MIT