I'm trying to learn node, angular, javascript, express and jade. Its all very new to me coming from a strictly .net based code environment.
So I've found a tutorial, but already at step 2 I run into a trouble. Now this is a direct copy paste from the tutorial I did in the index.jade file Eclipse auto create upon making a new project.
I insert the following code into the file
doctype 5
html(lang='en)
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width,initial-scale=1, user-scalable=no')
title= title
link(rel='stylesheet', href='//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css')
link(rel='stylesheet', href='/stylesheets/style.css')
body
nav.navbar.navbar-inverse.navbar-fixed-top(role='navigation')
div.navbar-header
a.navbar-brand(href='#/polls')= title
div.container
div
And I get an Unexpected token 'Indent' error, right around the head of the html. Now I'm very green at using both Eclipse and Jade and I have no idea what to do. I've searched stackoverflow, but can't seem to find anyone with a problem exactly like mine so I'm quite lost. Any tips would be much appreciated.
your document should start without any whitespace (beginning right at the left side of your document), it's probably a side-effect of the copypaste, here's how it should look :
doctype html
html
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width,initial-scale=1, user-scalable=no')
title= title
link(rel='stylesheet', href='//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css')
link(rel='stylesheet', href='/stylesheets/style.css')
body
nav.navbar.navbar-inverse.navbar-fixed-top(role='navigation')
div.navbar-header
a.navbar-brand(href='#/polls')= title
div.container
div
Answer from comment:
If that is exactly like how it is inside your code, then you need to unindent all of your code, and it will work. Jade code cannot start indented.