docs-v8
docs-v8 copied to clipboard
Adjust import statement so that it work as example
The current import statement in the plain tutorial doesn't work. So I adjusted it to a real working example. I'm not a java script expert, maybe it's better to introduce an index.js
file, so that the current example work. However I guess this approach is more beginner friendly. Cause it's don't need the knowledge about a import statement with an index.js
file.
Good catch, I believe the imports are correct for the GitHub sample repo, but not the tutorial content itself - in the repo, there are index.ts
files in the models
and services
folders that export everything:
https://github.com/NativeScript/tutorials/blob/main/plain-tutorial/app/services/index.ts https://github.com/NativeScript/tutorials/blob/main/plain-tutorial/app/models/index.ts
We should either include those in the tutorial text, or drop them and just use full imports. I'm fine with either way...
/cc @NathanWalker @williamjuan027
@rigor789 i didn't noticed that there is a repo for the tutorials, therefor a would recommend also to use the index.js
in the tutorials :)