Sencha index.html 간단하게 만들기
2024. 12. 15. 19:08ㆍJavascript/Sencha
index.html: app.js를 호출
<!DOCTYPE HTML>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=10, user-scalable=yes">
<title>Home</title>
<link rel="stylesheet" type="text/css" href="/resources/classic/theme-classic/resources/theme-classic-all.css">
<script type="text/javascript" src="/resources/js/ext-all.js"></script>
<script type="text/javascript" src="/resources/js/packages/charts/classic/charts.js"></script>
<script type="text/javascript" src="/resources/js/util.js"></script>
<script type="text/javascript" src="/resources/js/app.js"></script>
</head>
<body>
<div th:id="${_csrf.parameterName}" th:text="${_csrf.token}" style="display:none"></div>
</body>
</html>
app.js
Application.js를 호출
mainView 지정
Ext.application({
extend: 'Home.Application',
name: 'Home',
requires: [
// This will automatically load all classes in the Home namespace
// so that application classes do not need to require each other.
'Home.*'
],
// The name of the initial view to create.
mainView: 'Home.view.main.Main'
});
Application.js
Ext.define('Home.Application', {
extend: 'Ext.app.Application',
name: 'Home',
// Load any required classes
requires: [
'Home.view.main.Main'
],
// Application launch logic
launch: function () {
console.log('Application launched');
}
});
'Javascript > Sencha' 카테고리의 다른 글
Sencha theme 동적 적용 (0) | 2024.12.15 |
---|---|
Sencha theme 적용 순서 (0) | 2024.12.15 |
Sencha charts 패키지 사용하기 (0) | 2024.12.14 |
Sencha panel안에 grid 2개를 수평으로 꽉꽉 채우기 (0) | 2024.12.13 |
Sencha grid 변경 플래그 제거하기 (0) | 2024.12.13 |