This is the pug file for an html view.
Im tryng to put all the h1 elements inside the form but I can't find the way because I obtain different syntax errors.
Now is working with this .pug
doctype html
html
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1, shrink-to-fit=no')
link(href='https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css', rel='stylesheet')
title Your first page
body
form
h1(id='firstnumber') res
h1(id='plus') +
h1(id='secondnumber') res
h1(id='equal') =
h1(id='result') res
script(src='https://code.jquery.com/jquery-3.3.1.min.js')
script(src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js')
script(src='https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js')
script(type='text/javascript') console.log("hello"); var x=3; var y=2; var res=x+y; document.getElementById("firstnumber").innerHTML=x; document.getElementById("secondnumber").innerHTML=y; document.getElementById("result").innerHTML=res;
But h1 elements aren't inside the form.
I tried also this:´
doctype html
html
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1, shrink-to-fit=no')
link(href='https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css', rel='stylesheet')
title Your first page
body
form
h1(id='firstnumber') res
h1(id='plus') +
h1(id='secondnumber') res
h1(id='equal') =
h1(id='result') res
script(src='https://code.jquery.com/jquery-3.3.1.min.js')
script(src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js')
script(src='https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js')
script(type='text/javascript') console.log("hello"); var x=3; var y=2; var res=x+y; document.getElementById("firstnumber").innerHTML=x; document.getElementById("secondnumber").innerHTML=y; document.getElementById("result").innerHTML=res;
That I believe is the right way but I'm obtaining this Syntax error
I'm using Notepad++.