문제

I was refactoring a simple project today that had a partial. When I got it updated from globals to modules using ES6 I ran into an issue where ember could not find a partial (and this worked before the upgrade).

The partial file was named _foo.handlebars and placed in the root templates folder (no nesting like when the app was globals)

It was available in the final deps.min.js that was compiled down via Grunt (again -same process as the globals version). In the parent template it was referenced like so

{{partial "foo"}}

Does using EAK require you name/organize partials in a special way that I'm unaware of?

도움이 되었습니까?

해결책

I can't speak for Ember App Kit since I only use Ember CLI. Since Ember CLI is the successor this solution will probably also work for Ember App Kit.

If you remove the underscore from the file name it should be found by Ember. At least that's the way it works with Ember CLI. {{render 'test'}} picks up the template at app/templates/test.hbs.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top