I am a newbie in Ext JS. I am creating the very first application explained in this tutorial: http://www.sencha.com/learn/getting-started-with-ext-js-4 and as mentioned in it I have created index.html with the following contents:
<html>
<head>
<title>Hello Ext</title>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
<script type="text/javascript" src="extjs/ext-debug.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body></body>
</html>
and app.js with following code:
<a href="#!/api/Ext-method-application" rel="Ext-method-application" class="docClass">Ext.application</a>({
name: 'HelloExt',
launch: function() {
<a href="#!/api/Ext-method-create" rel="Ext-method-create" class="docClass">Ext.create</a>('<a href="#!/api/Ext.container.Viewport" rel="Ext.container.Viewport" class="docClass">Ext.container.Viewport</a>', {
layout: 'fit',
items: [
{
title: 'Hello Ext',
html : 'Hello! Welcome to Ext JS.'
}
]
});
}
});
But it shows me blank page. If I debug it using Chrome developer tools, it shows me this error: Uncaught SyntaxError: Unexpected token < in app.js:1
I have tried hard but got no idea what is going wrong in app.js
I am sure my framework is properly set up and working, but the page is blank when it is loaded.
Thank you.
You’ll probably have better luck using real Javascript instead of their wrongly copy/pasted html wrapped javascript text: