ember-cli-hash-anywhere v0.0.4
ember-cli-hash-anywhere
Deprecation Notice: This add-on was developed to address issues I was facing in Ember CLI 0.2.0. Changes released in Ember CLI 0.2.5 appear to address the pain that this add-on was designed to alleviate. Therefore this entire add-on is deprecated, especially if you're using Ember CLI 0.2.5+.
It was fun, my Ember friends. RIP
ember-cli-hash-anywhere
. :sob:
Your desire is the combination of these 2 things, which is not supported by Ember CLI out of the box:
- You want to use the old-school hash-based routing in your Ember application (e.g.,
https://app.example.com/#/friends/123
). - You want for this routing to completely ignore the
path
part of the URL and still serve up yourapp/index.html
page (for example: ignore theabout/team
part ofhttps://app.example.com/about/team/#/friends/123
).
So you install this add-on, and it works all magic-like!
Installation
Run this command:
$ ember install:addon ember-cli-hash-anywhere
Under the Hood
I cannot say that this implementation is all that fancy though. It was just a matter of copying Ember CLI's
history-support-middleware
server middleware and making a minor tweak to make it run when config.locationType
is
set to hash
.
Semantic Versioning
ember-cli-hash-anywhere honors the concepts behind semantic versioning:
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
License
Copyright 2015 Minimal Orange, LLC.
ember-cli-hash-anywhere is released under the MIT License.