Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust import statement so that it work as example #99

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

reneroboter
Copy link
Contributor

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.jsfile, 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.

@cla-bot cla-bot bot added the cla: yes label Aug 31, 2022
@rigor789
Copy link
Member

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

@reneroboter
Copy link
Contributor Author

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants