You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
initSubViews: function() {
var that = this;
$('[data-controller]').each(function() {
var controller = $(this).data('controller');
var viewPath = 'views/' + controller;
var el = $(this);
require([viewPath], function(View) {
var view = new View({
el: el,
eventBus: that.eventBus
});
});
});
}
Which gets converted into this when I run amdclean:
initSubViews: function() {
var that = this;
$('[data-controller]').each(function() {
var controller = $(this).data('controller');
var viewPath = 'views/' + controller;
var el = $(this);
(function(View) {
var view = new View({
el: el,
eventBus: that.eventBus
});
}());
});
}
When I run my app, console reports: Uncaught TypeError: View is not a function and traces it to this line:
var view = new View({
Any ideas what it would be tripping up on?
The text was updated successfully, but these errors were encountered:
I have this function:
Which gets converted into this when I run
amdclean
:When I run my app, console reports:
Uncaught TypeError: View is not a function
and traces it to this line:var view = new View({
Any ideas what it would be tripping up on?
The text was updated successfully, but these errors were encountered: