-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
2,545 additions
and
1,623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{{page-title "Example"}} | ||
<h1>Host app</h1> | ||
|
||
{{!-- The following component displays Ember's default welcome message. --}} | ||
<WelcomePage /> | ||
{{!-- Feel free to remove this! --}} | ||
<LinkTo @route='foo'>Go to Foo Engine</LinkTo> | ||
|
||
{{outlet}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Controller from '@ember/controller'; | ||
import { action } from '@ember/object'; | ||
import { inject } from '@ember/service'; | ||
import { tracked } from '@glimmer/tracking'; | ||
|
||
export default class ApplicationController extends Controller { | ||
queryParams = ['page']; | ||
|
||
@tracked page = 1; | ||
|
||
@inject router; | ||
|
||
@action | ||
goToPage1() { | ||
this.router.transitionTo({ queryParams: { page: 1 } }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Engine from 'ember-engines/engine'; | ||
import loadInitializers from 'ember-load-initializers'; | ||
import Resolver from './resolver'; | ||
import config from './config/environment'; | ||
|
||
const { modulePrefix } = config; | ||
|
||
const Eng = Engine.extend({ | ||
modulePrefix, | ||
Resolver, | ||
}); | ||
|
||
loadInitializers(Eng, modulePrefix); | ||
|
||
export default Eng; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Resolver from 'ember-resolver'; | ||
|
||
export default Resolver; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import buildRoutes from 'ember-engines/routes'; | ||
|
||
export default buildRoutes(function () { | ||
// Define your engine's route map here | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<h2>Foo Engine</h2> | ||
|
||
Click me first: | ||
|
||
<LinkTo @route='application' @query={{hash page=2}}>Go to page 2</LinkTo> | ||
|
||
<br /> | ||
<br /> | ||
|
||
Then click me: | ||
|
||
<button type='button' {{on 'click' this.goToPage1}}>Go to Page 1</button> | ||
|
||
{{outlet}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* eslint-env node */ | ||
'use strict'; | ||
|
||
module.exports = function (environment) { | ||
let ENV = { | ||
modulePrefix: 'foo', | ||
environment, | ||
}; | ||
|
||
return ENV; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* eslint-env node */ | ||
'use strict'; | ||
|
||
const EngineAddon = require('ember-engines/lib/engine-addon'); | ||
|
||
module.exports = EngineAddon.extend({ | ||
name: 'foo', | ||
|
||
lazyLoading: Object.freeze({ | ||
enabled: false, | ||
}), | ||
|
||
isDevelopingAddon() { | ||
return true; | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "foo", | ||
"keywords": [ | ||
"ember-addon", | ||
"ember-engine" | ||
], | ||
"dependencies": { | ||
"ember-cli-htmlbars": "*", | ||
"ember-cli-babel": "*" | ||
} | ||
} |
Oops, something went wrong.