Skip to content

Commit

Permalink
Update license and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
villander committed Mar 25, 2020
1 parent 2c4dbdd commit 194ce92
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020
Copyright (c) 2020 Michael Villander

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ember-engines-router-service
==============================================================================

[Short description of the addon.]
Provides the [Router service](https://api.emberjs.com/ember/release/classes/RouterService) for ember-engines.


Compatibility
Expand All @@ -21,9 +21,33 @@ ember install ember-engines-router-service


Usage

Basically you have all [RouterService](https://api.emberjs.com/ember/release/classes/RouterService) API with `*External` sufix to each one using new "external routing" APIs such as `transitionToExternal` and `isActiveExternal`.

Using the external routes will take advantage of new "external routing" APIs

------------------------------------------------------------------------------
```js
import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
import { action } from "@ember/object";

export default class SomeComponent extends Component {
@service router;

@action
transitionToHome() {
this.router.transitionToExternal('other.route');
}

@action
redirectToHome() {
this.router.replaceWithExternal('other.route');
}
}
```

[Longer description of how to use the addon in apps.]
For further documentation on this subject, view the [Engine Linking RFC](https://github.com/emberjs/rfcs/pull/122).


Contributing
Expand Down

0 comments on commit 194ce92

Please sign in to comment.