I'm new to ExtJs and want to integrate ExtJs 5 app created with Sencha CMD to WebAPI app!
I did the integration for BUILD mode, but not for the DEVELOPMENT mode.
Regarding to this post the steps of integration are done as show below!
Step 1. Creating the path: C:\VCProject\SVCodeCampWeb\WebAPI
Step 2. Creating the WebAPI project named 'API_NAME' on the directory of Step 1.
Step 3. Moving ExtJS 5 framework (ext-5.0.0) to the directory of Step 1.
Step 4. Generating the extjs app with sencha cmd:
C:\VCProject\SVCodeCampWeb\WebAPI\ext-5.0.0>sencha generate app MyApp C:\VCProject\SVCodeCampWeb\WebAPI\API_NAME\API_NAME\CMDBUG1
Step 5. Including the ext app to Web Api through the Solution Explorer.
Step 6. Building the app with sencha cmd as shown below:
C:\Users\albert\Documents\Visual Studio 2013\Projects\BMSIA\BMSIA.Web\BMSJS>sencha app build
WORKS!!! These are the files that I included in my _Layout.chtml of the WebAPI for BUILD mode and works!
<script src="~/CMDBUG1/build/production/MyApp/app.js"></script>
<link href="~/CMDBUG1/build/production/MyApp/resources/MyApp-all.css" rel="stylesheet" />
ERROR SECTION!!!
And for DEVELOPMENT mode I'm including these files:
< link href="~/CMDBUG1/build/production/MyApp/resources/MyApp-all.css" rel="stylesheet" />
< script src="~/CMDBUG1/ext/ext-all.js"></script>
< script src="~/CMDBUG1/app.js"></script>
But it's throwing this error:
TypeError: Ext.application is not a function
If you need more details, let me know!
Any help will be appreciated!