I have been reading Ember CLI 101 to understand the resource / route distinction but am having trouble understanding the situation below:
I created a new project with ember-cli and ran:
ember g resource testme --pod
and
ember g route testme/testresource --pod.
Then, I added changed testme/template.hbs to look like:
This is test me1.
{{outlet}}
and changed testme/testresource/template.hbs to look like
This is the test resource .
{{outlet}}
The routes look something like
this.resource('testme', function() {
this.resource('testresource', function() {});
});
Why is it the case that navigating to
http://localhost:4200/testme/testresource
presents just
This is test me1.
and not
This is test me1. This is the test resource .
If I change testresource to a route, I get the both sentences. Why don't I get both if testresource is a resource? What's the point of having the 2nd template if it doesn't get rendered?
Aucun commentaire:
Enregistrer un commentaire