Zmienna odniesienia szablonu
show(lastName: HTMLInputElement){ console.log(lastName.value);}
Delightful Dogfish
show(lastName: HTMLInputElement){ console.log(lastName.value);}
// Using EJS:
// subreddit.ejs inside a views folder:
<h1> Welcome to the <%= subreddit %> subreddit</h1>
// app route
app.get("/r/:subreddit", function(req, res){
var sub = req.params.subreddit;
res.render("subreddit.ejs", {subreddit: sub});
});
<button (click)="show(lastNameInput)">Show</button>