Skip to content

Commit

Permalink
Restructure readme to help new users get started (#106)
Browse files Browse the repository at this point in the history
Combines the "Installation" and "Usage" sections (now after the demo / example etc) to help new users get started with minimal frustration.
  • Loading branch information
pauln authored and RobbieTheWagner committed Mar 23, 2018
1 parent 8d88544 commit f220cd9
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@

> Scroll to page top on transition, like a non-SPA website. An alternative scroll behavior for Ember applications.
## Installation

```
ember install ember-router-scroll
```

### Options
You can specify the id of an element for which the scroll position is saved and set. Default is `window` for using the scroll position of the whole viewport. You can pass an options object in your application's `config/environment.js` file.

```javascript
ENV['routerScroll'] = {
scrollElement: '#mainScrollElement'
};
```

## A working example
See [demo](https://dollarshaveclub.github.io/ember-router-scroll/) made by [Jon Chua](https://github.com/Chuabacca/).

Expand All @@ -42,7 +27,8 @@ In addition to scrolling to the top of the page on most transitions, a user woul

**ember-router-scroll** makes your single page application feel more like a regular website.

## Usage

## Installation & Usage

1. Install addon

Expand Down Expand Up @@ -84,6 +70,15 @@ In your router and controller tests, add `'service:router-scroll'` and `'service
needs:[ 'service:router-scroll', 'service:scheduler' ],
```

### Options
You can specify the id of an element for which the scroll position is saved and set. Default is `window` for using the scroll position of the whole viewport. You can pass an options object in your application's `config/environment.js` file.

```javascript
ENV['routerScroll'] = {
scrollElement: '#mainScrollElement'
};
```

## Issues with nested routes

### Before:
Expand Down

0 comments on commit f220cd9

Please sign in to comment.