I'm creating a lightning component named "scroll" and a controller file associated with it. Here's the opening tag of .cmp file:
<aura:component controller="scrollController" implements="force:appHostable,flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes" access="global" >
Every time I try to save the .cmp
file, I get this error:
Failed to save scroll.cmp: Invalid definition for null:scrollController: null: Source
If I remove controller="scrollController"
it will save no problem.
I stripped down the controller file to just a simple alert to weed out any possible JS issues:
({
scroll: function() {
alert('this works');
},
})
scrollController
available?Apex Class
namedscrollController
? If so please share it here.