function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brennon Willams ts2-dev-toolsBrennon Willams ts2-dev-tools 

Example lightning component stops working when anything is changed?

Hi,

I'm creating a Lightning component, and to farmiliarize myself with the process I followed the Salesforce Lightning component creation tutorial (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_one_demo_load.htm). I followed the tutorial to the letter, and everything works fine until either of the .cmp files (one for contacts, one for contactList) change at all from the tutorial version. And I mean literally any change breaks the component. I'll open the component view on the Salesforce1 app, contacts are retrieved and listed properly, and then I make a change to contactList.cmp or contacts.cmp, be it a comment, a newline, anything, and the conacts won't load. For instance, editing a pre-existing comment in contactList.cmp like "<!-- Display the edit record page when the icon is clicked -->" and changing it to "<!-- Display the edit record page when an icon is clicked -->" breaks the entire component. No errors are thrown, but once contactList.cmp is saved the list is never displayed. I've tried relaunching the app and restarting the phone, both to no avail.
This problem has me banging my head against the wall. It's bizaree that a change in a comment could break the enitre componet. Is there some compile step I'm missing or something? Why would any change break functionality?

Thanks!
RishavRishav
HIi Brennon,
Ya it's really bizzare.
I think it happens sometime when you copy and paste the code from the web. 
if you have done copy paste then first do it in a document then bring it into your component. 
It may solve your problems. 

Thanks
Rishav