I define three arrays in my index.js file, but my index.ejs file can only identify the first one?
up vote
1
down vote
favorite
I'm trying to make a to-do list with the 1-3-5 rule, so I create three html forms and want to store them in three different arrays. But my it seems like the .ejs file can only access the task array, but cannot identify task3 and task5.
When I run the code, the browser return: task3 is not defined.
I can't figure out why, please help! Thanks!
index.js (controller)
var express = require("express");
var bodyParser = require("body-parser");
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.set("view engine", "ejs");
//render css files
app.use(express.static("public"));
//placeholders for added task
var task = ;
var task3 = ;
var task5 = ;
//placeholders for removed task
var complete = ;
//post route for adding new task
app.post("/addtask", function(req, res) {
var newTask = req.body.newtask;
task.push(newTask);
res.redirect("/");
});
app.post("/addtask3", function(req, res) {
var newTask = req.body.newtask3;
task3.push(newTask);
res.redirect("/");
});
app.post("/addtask5", function(req, res) {
var newTask = req.body.newtask5;
task5.push(newTask);
res.redirect("/");
});
app.post("/completetask", function(req, res) {
var completeTask = req.body.check;
//check for the "typeof" the different completed task, then add into the complete task
if (typeof completeTask === "string") {
complete.push(completeTask);
//check if the completed task already exits in the task when checked, then remove it
task.splice(task.indexOf(completeTask), 1);
} else if (typeof completeTask === "object") {
for (var i = 0; i < completeTask.length; i++) {
complete.push(completeTask[i]);
task.splice(task.indexOf(completeTask[i]), 1);
}
}
res.redirect("/");
});
app.post("/removetask", function(req, res) {
var removeTask = req.body.check;
//check for the "typeof" the different completed task, then add into the complete task
if (typeof removeTask === "string") {
task.splice(task.indexOf(removeTask), 1);
} else if (typeof removeTask === "object") {
for (var i = 0; i < removeTask.length; i++) {
task.splice(task.indexOf(removeTask[i]), 1);
}
}
res.redirect("/");
});
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
//set app to listen on port 3000
app.listen(3000, function() {
console.log("server is running on port 3000");
});
index.ejs (viewer)
<html>
<head>
<title> ToDo App </title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1> ToDo List </h1>
<h2> 1 Big Thing </h2>
<form method="POST">
<p />
<input type="text" name="newtask" placeholder="add big task">
<button formaction="/addtask"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
<% for( var i = 0; i < task.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task[i] %>" /> <%= task[i] %> </li>
<% } %>
<h2> 3 Medium Things </h2>
<p />
<input type="text" name="newtask3" placeholder="add medium task">
<button formaction="/addtask3"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
<% for( var i = 0; i < task3.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task3[i] %>" /> <%= task3[i] %> </li>
<% } %>
<h2> 5 Small Things </h2>
<p />
<input type="text" name="newtask5" placeholder="add small task">
<button formaction="/addtask5"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
</form>
<% for( var i = 0; i < task5.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task5[i] %>" /> <%= task5[i] %> </li>
<% } %>
<h2> Completed task </h2>
<% for(var i = 0; i < complete.length; i++){ %>
<li><input type="checkbox" checked><%= complete[i] %> </li>
<% } %>
</div>
</body>
</html>
javascript node.js express ejs
add a comment |
up vote
1
down vote
favorite
I'm trying to make a to-do list with the 1-3-5 rule, so I create three html forms and want to store them in three different arrays. But my it seems like the .ejs file can only access the task array, but cannot identify task3 and task5.
When I run the code, the browser return: task3 is not defined.
I can't figure out why, please help! Thanks!
index.js (controller)
var express = require("express");
var bodyParser = require("body-parser");
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.set("view engine", "ejs");
//render css files
app.use(express.static("public"));
//placeholders for added task
var task = ;
var task3 = ;
var task5 = ;
//placeholders for removed task
var complete = ;
//post route for adding new task
app.post("/addtask", function(req, res) {
var newTask = req.body.newtask;
task.push(newTask);
res.redirect("/");
});
app.post("/addtask3", function(req, res) {
var newTask = req.body.newtask3;
task3.push(newTask);
res.redirect("/");
});
app.post("/addtask5", function(req, res) {
var newTask = req.body.newtask5;
task5.push(newTask);
res.redirect("/");
});
app.post("/completetask", function(req, res) {
var completeTask = req.body.check;
//check for the "typeof" the different completed task, then add into the complete task
if (typeof completeTask === "string") {
complete.push(completeTask);
//check if the completed task already exits in the task when checked, then remove it
task.splice(task.indexOf(completeTask), 1);
} else if (typeof completeTask === "object") {
for (var i = 0; i < completeTask.length; i++) {
complete.push(completeTask[i]);
task.splice(task.indexOf(completeTask[i]), 1);
}
}
res.redirect("/");
});
app.post("/removetask", function(req, res) {
var removeTask = req.body.check;
//check for the "typeof" the different completed task, then add into the complete task
if (typeof removeTask === "string") {
task.splice(task.indexOf(removeTask), 1);
} else if (typeof removeTask === "object") {
for (var i = 0; i < removeTask.length; i++) {
task.splice(task.indexOf(removeTask[i]), 1);
}
}
res.redirect("/");
});
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
//set app to listen on port 3000
app.listen(3000, function() {
console.log("server is running on port 3000");
});
index.ejs (viewer)
<html>
<head>
<title> ToDo App </title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1> ToDo List </h1>
<h2> 1 Big Thing </h2>
<form method="POST">
<p />
<input type="text" name="newtask" placeholder="add big task">
<button formaction="/addtask"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
<% for( var i = 0; i < task.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task[i] %>" /> <%= task[i] %> </li>
<% } %>
<h2> 3 Medium Things </h2>
<p />
<input type="text" name="newtask3" placeholder="add medium task">
<button formaction="/addtask3"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
<% for( var i = 0; i < task3.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task3[i] %>" /> <%= task3[i] %> </li>
<% } %>
<h2> 5 Small Things </h2>
<p />
<input type="text" name="newtask5" placeholder="add small task">
<button formaction="/addtask5"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
</form>
<% for( var i = 0; i < task5.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task5[i] %>" /> <%= task5[i] %> </li>
<% } %>
<h2> Completed task </h2>
<% for(var i = 0; i < complete.length; i++){ %>
<li><input type="checkbox" checked><%= complete[i] %> </li>
<% } %>
</div>
</body>
</html>
javascript node.js express ejs
Could you show the code of the controller passing tasks to the view?
– iagowp
Nov 21 at 13:32
@lagowp I already edit to show the code, please take a look!
– Alex
Nov 21 at 14:11
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to make a to-do list with the 1-3-5 rule, so I create three html forms and want to store them in three different arrays. But my it seems like the .ejs file can only access the task array, but cannot identify task3 and task5.
When I run the code, the browser return: task3 is not defined.
I can't figure out why, please help! Thanks!
index.js (controller)
var express = require("express");
var bodyParser = require("body-parser");
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.set("view engine", "ejs");
//render css files
app.use(express.static("public"));
//placeholders for added task
var task = ;
var task3 = ;
var task5 = ;
//placeholders for removed task
var complete = ;
//post route for adding new task
app.post("/addtask", function(req, res) {
var newTask = req.body.newtask;
task.push(newTask);
res.redirect("/");
});
app.post("/addtask3", function(req, res) {
var newTask = req.body.newtask3;
task3.push(newTask);
res.redirect("/");
});
app.post("/addtask5", function(req, res) {
var newTask = req.body.newtask5;
task5.push(newTask);
res.redirect("/");
});
app.post("/completetask", function(req, res) {
var completeTask = req.body.check;
//check for the "typeof" the different completed task, then add into the complete task
if (typeof completeTask === "string") {
complete.push(completeTask);
//check if the completed task already exits in the task when checked, then remove it
task.splice(task.indexOf(completeTask), 1);
} else if (typeof completeTask === "object") {
for (var i = 0; i < completeTask.length; i++) {
complete.push(completeTask[i]);
task.splice(task.indexOf(completeTask[i]), 1);
}
}
res.redirect("/");
});
app.post("/removetask", function(req, res) {
var removeTask = req.body.check;
//check for the "typeof" the different completed task, then add into the complete task
if (typeof removeTask === "string") {
task.splice(task.indexOf(removeTask), 1);
} else if (typeof removeTask === "object") {
for (var i = 0; i < removeTask.length; i++) {
task.splice(task.indexOf(removeTask[i]), 1);
}
}
res.redirect("/");
});
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
//set app to listen on port 3000
app.listen(3000, function() {
console.log("server is running on port 3000");
});
index.ejs (viewer)
<html>
<head>
<title> ToDo App </title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1> ToDo List </h1>
<h2> 1 Big Thing </h2>
<form method="POST">
<p />
<input type="text" name="newtask" placeholder="add big task">
<button formaction="/addtask"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
<% for( var i = 0; i < task.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task[i] %>" /> <%= task[i] %> </li>
<% } %>
<h2> 3 Medium Things </h2>
<p />
<input type="text" name="newtask3" placeholder="add medium task">
<button formaction="/addtask3"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
<% for( var i = 0; i < task3.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task3[i] %>" /> <%= task3[i] %> </li>
<% } %>
<h2> 5 Small Things </h2>
<p />
<input type="text" name="newtask5" placeholder="add small task">
<button formaction="/addtask5"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
</form>
<% for( var i = 0; i < task5.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task5[i] %>" /> <%= task5[i] %> </li>
<% } %>
<h2> Completed task </h2>
<% for(var i = 0; i < complete.length; i++){ %>
<li><input type="checkbox" checked><%= complete[i] %> </li>
<% } %>
</div>
</body>
</html>
javascript node.js express ejs
I'm trying to make a to-do list with the 1-3-5 rule, so I create three html forms and want to store them in three different arrays. But my it seems like the .ejs file can only access the task array, but cannot identify task3 and task5.
When I run the code, the browser return: task3 is not defined.
I can't figure out why, please help! Thanks!
index.js (controller)
var express = require("express");
var bodyParser = require("body-parser");
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.set("view engine", "ejs");
//render css files
app.use(express.static("public"));
//placeholders for added task
var task = ;
var task3 = ;
var task5 = ;
//placeholders for removed task
var complete = ;
//post route for adding new task
app.post("/addtask", function(req, res) {
var newTask = req.body.newtask;
task.push(newTask);
res.redirect("/");
});
app.post("/addtask3", function(req, res) {
var newTask = req.body.newtask3;
task3.push(newTask);
res.redirect("/");
});
app.post("/addtask5", function(req, res) {
var newTask = req.body.newtask5;
task5.push(newTask);
res.redirect("/");
});
app.post("/completetask", function(req, res) {
var completeTask = req.body.check;
//check for the "typeof" the different completed task, then add into the complete task
if (typeof completeTask === "string") {
complete.push(completeTask);
//check if the completed task already exits in the task when checked, then remove it
task.splice(task.indexOf(completeTask), 1);
} else if (typeof completeTask === "object") {
for (var i = 0; i < completeTask.length; i++) {
complete.push(completeTask[i]);
task.splice(task.indexOf(completeTask[i]), 1);
}
}
res.redirect("/");
});
app.post("/removetask", function(req, res) {
var removeTask = req.body.check;
//check for the "typeof" the different completed task, then add into the complete task
if (typeof removeTask === "string") {
task.splice(task.indexOf(removeTask), 1);
} else if (typeof removeTask === "object") {
for (var i = 0; i < removeTask.length; i++) {
task.splice(task.indexOf(removeTask[i]), 1);
}
}
res.redirect("/");
});
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
//set app to listen on port 3000
app.listen(3000, function() {
console.log("server is running on port 3000");
});
index.ejs (viewer)
<html>
<head>
<title> ToDo App </title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1> ToDo List </h1>
<h2> 1 Big Thing </h2>
<form method="POST">
<p />
<input type="text" name="newtask" placeholder="add big task">
<button formaction="/addtask"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
<% for( var i = 0; i < task.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task[i] %>" /> <%= task[i] %> </li>
<% } %>
<h2> 3 Medium Things </h2>
<p />
<input type="text" name="newtask3" placeholder="add medium task">
<button formaction="/addtask3"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
<% for( var i = 0; i < task3.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task3[i] %>" /> <%= task3[i] %> </li>
<% } %>
<h2> 5 Small Things </h2>
<p />
<input type="text" name="newtask5" placeholder="add small task">
<button formaction="/addtask5"> Add </button>
<button formaction="/completetask" type="submit" id="top"> Complete </button>
<button formaction="/removetask" type="submit" id="top"> Delete </button>
</form>
<% for( var i = 0; i < task5.length; i++){ %>
<li><input type="checkbox" name="check" value="<%= task5[i] %>" /> <%= task5[i] %> </li>
<% } %>
<h2> Completed task </h2>
<% for(var i = 0; i < complete.length; i++){ %>
<li><input type="checkbox" checked><%= complete[i] %> </li>
<% } %>
</div>
</body>
</html>
javascript node.js express ejs
javascript node.js express ejs
edited Nov 21 at 14:10
asked Nov 21 at 13:28
Alex
145
145
Could you show the code of the controller passing tasks to the view?
– iagowp
Nov 21 at 13:32
@lagowp I already edit to show the code, please take a look!
– Alex
Nov 21 at 14:11
add a comment |
Could you show the code of the controller passing tasks to the view?
– iagowp
Nov 21 at 13:32
@lagowp I already edit to show the code, please take a look!
– Alex
Nov 21 at 14:11
Could you show the code of the controller passing tasks to the view?
– iagowp
Nov 21 at 13:32
Could you show the code of the controller passing tasks to the view?
– iagowp
Nov 21 at 13:32
@lagowp I already edit to show the code, please take a look!
– Alex
Nov 21 at 14:11
@lagowp I already edit to show the code, please take a look!
– Alex
Nov 21 at 14:11
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Your problem is with what you are sending to your view
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
You see? you are rendering the view index, passing two objects to it, task
and complete
. Then, on your view, you try to access task3
, but you've never sent it. For your code to run, you should change this line to
app.get("/", function(req, res) {
res.render("index", { task: task, task3: task3, task5: task5, complete: complete });
});
Or this, if you are using a modern version of node
app.get("/", function(req, res) {
res.render("index", { task, task3, task5, complete });
});
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 14:59
add a comment |
up vote
0
down vote
Because when you are rendering the page you are only sending task from server you are not sending task3 and task5 you need to send them too.
before it was
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
it should be something like below
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task,task3:task3, task5:task5, complete: complete });
});
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 15:00
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Your problem is with what you are sending to your view
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
You see? you are rendering the view index, passing two objects to it, task
and complete
. Then, on your view, you try to access task3
, but you've never sent it. For your code to run, you should change this line to
app.get("/", function(req, res) {
res.render("index", { task: task, task3: task3, task5: task5, complete: complete });
});
Or this, if you are using a modern version of node
app.get("/", function(req, res) {
res.render("index", { task, task3, task5, complete });
});
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 14:59
add a comment |
up vote
1
down vote
accepted
Your problem is with what you are sending to your view
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
You see? you are rendering the view index, passing two objects to it, task
and complete
. Then, on your view, you try to access task3
, but you've never sent it. For your code to run, you should change this line to
app.get("/", function(req, res) {
res.render("index", { task: task, task3: task3, task5: task5, complete: complete });
});
Or this, if you are using a modern version of node
app.get("/", function(req, res) {
res.render("index", { task, task3, task5, complete });
});
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 14:59
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Your problem is with what you are sending to your view
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
You see? you are rendering the view index, passing two objects to it, task
and complete
. Then, on your view, you try to access task3
, but you've never sent it. For your code to run, you should change this line to
app.get("/", function(req, res) {
res.render("index", { task: task, task3: task3, task5: task5, complete: complete });
});
Or this, if you are using a modern version of node
app.get("/", function(req, res) {
res.render("index", { task, task3, task5, complete });
});
Your problem is with what you are sending to your view
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
You see? you are rendering the view index, passing two objects to it, task
and complete
. Then, on your view, you try to access task3
, but you've never sent it. For your code to run, you should change this line to
app.get("/", function(req, res) {
res.render("index", { task: task, task3: task3, task5: task5, complete: complete });
});
Or this, if you are using a modern version of node
app.get("/", function(req, res) {
res.render("index", { task, task3, task5, complete });
});
answered Nov 21 at 14:32
iagowp
809523
809523
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 14:59
add a comment |
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 14:59
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 14:59
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 14:59
add a comment |
up vote
0
down vote
Because when you are rendering the page you are only sending task from server you are not sending task3 and task5 you need to send them too.
before it was
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
it should be something like below
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task,task3:task3, task5:task5, complete: complete });
});
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 15:00
add a comment |
up vote
0
down vote
Because when you are rendering the page you are only sending task from server you are not sending task3 and task5 you need to send them too.
before it was
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
it should be something like below
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task,task3:task3, task5:task5, complete: complete });
});
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 15:00
add a comment |
up vote
0
down vote
up vote
0
down vote
Because when you are rendering the page you are only sending task from server you are not sending task3 and task5 you need to send them too.
before it was
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
it should be something like below
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task,task3:task3, task5:task5, complete: complete });
});
Because when you are rendering the page you are only sending task from server you are not sending task3 and task5 you need to send them too.
before it was
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task, complete: complete });
});
it should be something like below
//render the ejs and display added task, completed task
app.get("/", function(req, res) {
res.render("index", { task: task,task3:task3, task5:task5, complete: complete });
});
answered Nov 21 at 14:37
ahmed waqas nasir
215
215
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 15:00
add a comment |
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 15:00
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 15:00
Yea I just figured it out just now >.<, but thank you anyway!
– Alex
Nov 21 at 15:00
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53413118%2fi-define-three-arrays-in-my-index-js-file-but-my-index-ejs-file-can-only-identi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Could you show the code of the controller passing tasks to the view?
– iagowp
Nov 21 at 13:32
@lagowp I already edit to show the code, please take a look!
– Alex
Nov 21 at 14:11