https://github.com/thinkhr-code/ember-cli-ahoy
Shim for ahoy.js
https://github.com/thinkhr-code/ember-cli-ahoy
addon emberjs mammothhr
Last synced: 11 days ago
JSON representation
Shim for ahoy.js
- Host: GitHub
- URL: https://github.com/thinkhr-code/ember-cli-ahoy
- Owner: thinkhr-code
- License: mit
- Created: 2016-04-27T15:57:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T22:18:33.000Z (about 3 years ago)
- Last Synced: 2025-04-02T14:13:39.964Z (11 months ago)
- Topics: addon, emberjs, mammothhr
- Language: JavaScript
- Size: 1.07 MB
- Stars: 0
- Watchers: 9
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://travis-ci.org/MammothHR/ember-cli-ahoy)
# ember-cli-ahoy
Provides an ES6 module for using [ahoy.js](https://github.com/ankane/ahoy.js).
## Installation
* `ember install ember-cli-ahoy`
## Usage
* Shim
```
import Ahoy from 'ahoy';
```
* As a service
```
import Component from 'ember-component';
import service from 'ember-service/inject';
export default Component.extend({
ahoy: service(),
didInsertElement() {
this.get('ahoy').trackView({
url: 'foo-bar'
});
}
});
```
## Running Tests
* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
## Building
* `ember build`
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).