datvm
November 19, 2017, 4:42pm
1
Unfortunately, the guide here: http://aurelia.io/docs/binding/value-converters#signalable-value-converters does not have example for it. This is my project structure:
I have tried (each with and without leading ./ ):
“./app/converters/dateOnly”
“./app/converters/date-only”
“./app/converters/DateOnly”
“./converters/dateOnly”
“./converters/date-only”
“./converters/DateOnly”
All causes error: Error: Unable to find module with ID: ./converters/DateOnly
How should the resource path be?
datvm
November 19, 2017, 4:46pm
2
Solved, it’s:
aurelia
.use
.globalResources(PLATFORM.moduleName("app/converters/DateOnly"));
It should be mentioned in the documentation. Nowhere in the above link and this http://aurelia.io/docs/fundamentals/app-configuration-and-startup#making-resources-global say about wrapping it in PLATFORM.moduleName.
mttmccb
November 21, 2017, 4:43pm
3
Probably because it’s only really required for webpack, at least that’s my understanding.
datvm
November 21, 2017, 7:28pm
4
I see. Sorry I was mainly a back-end developer so I didn’t really understand about Webpack or Aurelia CLI. Probably should still mention that in the doc?
mttmccb
November 22, 2017, 7:32am
5
Yes, not sure if it is in the main docs or one of the docs for the webpack plugins
zewa666
November 22, 2017, 7:23pm
6
@datvm all documentation is generated from markdown files which are part of the respective repo.
So looking at your link you’ll see that its pointing to docs/binding
which means it points to this MD file https://github.com/aurelia/binding/blob/master/doc/article/en-US/binding-value-converters.md .
If you struggled and think its a good opportunity to add some notes there, why not create a PR on said file so it gets into the docs once approved and rebuilt?
1 Like
datvm
November 23, 2017, 2:27am
7
Oh wonderful! I didn’t know that. Will do. I am kinda new though so not sure if it will be helpful.