Hello:
I'm a very new user in Oracle JET and I have a lot of issues to add some controls (like oj-label) like this (using the developer tools view in Chrome):
Refused to execute script from 'http://localhost:8000/js/libs/oj/v3.2.0/debug/ojlabel.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
and...
http://localhost:8000/js/libs/oj/v3.2.0/debug/ojlabel.js net::ERR_ABORTED 404 (Not Found)
The steps to reproduce my problem:
- Create a new application using ojet create MyApp --template=navdrawer.
- Modifed dashboard.html to feel like this:
<div class=
"oj-hybrid-padding"> <h3>Dashboard Content Area</h3>
<div>
To change the content of this section, you will make edits to the dashboard.html file located in the /js/views folder.
</div>
<div class="oj-hybrid-padding">
<oj-label for="combobox">Seleccione planta: </oj-label>
<oj-combobox-one id="combobox" value="{{val}}" style="max-width:20em">
<oj-option value="VAL1">Value 1</oj-option>
<oj-option value="VAL2">Value 2</oj-option>
<oj-option value="VAL3">Value 3</oj-option>
<oj-option value="VAL4">Value 4</oj-option>
</oj-combobox-one>
</div>
</div>
I also modified the dashboard.js script file to feel like this:
define([
'ojs/ojcore',
'knockout',
'jquery',
'ojs/ojlabel',
'ojs/ojselectcombobox'],
function (oj, ko, $) {
function DashboardViewModel() {
var self = this;
self.handleActivated = function (info) {};
self.handleAttached = function (info) {};
self.handleBindingsApplied = function (info) {};
self.handleDetached = function (info) {};
self.val = ko.observable("VAL1");
}
return new DashboardViewModel();
}
);
I added, in main.js the references to ojlabel and ojselectcombobox like this:
require([
'ojs/ojcore',
'knockout',
'appController',
'ojs/ojknockout',
'ojs/ojmodule', 'ojs/ojrouter', 'ojs/ojnavigationlist', 'ojs/ojbutton', 'ojs/ojtoolbar',
'ojs/ojlabel', 'ojs/ojselectcombobox'],
And the same references in the appcontroller.js file like this:
define([
'ojs/ojcore',
'knockout',
'ojs/ojrouter',
'ojs/ojknockout',
'ojs/ojarraytabledatasource',
'ojs/ojoffcanvas', 'ojs/ojlabel', 'ojs/ojselectcombobox'],
When I try to execute the application using ojet serve or grunt serve only the Oracle logo is displayed and nothing else and, when I open the developer tools in Chrome, I see the errors described.
Can you help me?
I tried to uninstall and reinstall all (including Node) to verify if now its working, without success. I have the last version of Oracle JET at this time.