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

Update 2-playground-tutorial.md #162

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions content/docs/en/getting-started/2-playground-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ new Vue({
console.log('Task with index: ' + args.index + ' tapped'); // Logs tapped tasks in the console for debugging.
},
onButtonTap() {
if (this.textFieldValue === "") return // Prevent user input empty string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things here:

  • The semi-colon is missing at the end of the line
  • Please, pay attention to the format of code comments above and below and fix it for consistency. Ideally, here you would go with something like "Prevents users from entering an empty string."

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ikoevska ,

Sorry for the mistakes, i've updated the code. Thanks

console.log("New task added: " + this.textFieldValue + "."); // Logs the newly added task in the console for debugging.
this.todos.unshift({ name: this.textFieldValue }); // Adds tasks in the ToDo array. Newly added tasks are immediately shown on the screen.
this.textFieldValue = ""; // Clears the text field so that users can start adding new tasks immediately.
Expand Down Expand Up @@ -638,7 +639,7 @@ To implement a style particularly for the text of active tasks, you can set an `
1. In `app.js`, on line 67, set an `id` for the `<Label>` that represents active tasks and enable text wrapping. Enabling text wrapping ensures that longer text shows properly in your list

```HTML
<Label id="active-task" :text="todo.name" textWrap="true" >
<Label id="active-task" :text="todo.name" textWrap="true" />
```
1. On line 65, add the `separatorColor` property and set it to `transparent`. This way, the separator will no longer appear in your list.

Expand Down Expand Up @@ -701,4 +702,4 @@ This section applies the basic NativeScript knowledge from [Advanced design: Sty
#completed-list {
margin-top: 20;
}
```
```