Add route lifecycle hooks to a route's controller
If you want to reset state on your controller, you must override route hooks/events like so:
This couples a controller's private state to its route's code. You might then create a convention where you put controller setup code in its own function that you call from the route:
This addon functions the same way, it just eliminates the boilerplate by calling the hooks automatically.
ember install ember-controller-lifecycle
The hooks are automatically installed into every controller.
git clone <repository-url>
npm run lint:js
npm run lint:js -- --fix
ember test– Runs the test suite on the current Ember version
ember test --server– Runs the test suite in "watch mode"
ember try:each– Runs the test suite against multiple Ember versions
Running the dummy application
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
This project is licensed under the MIT License.