You need to sign in to do that
Don't have an account?

Create a HelloWorld Lightning Component issue
Welcome all,
I try to pass module Create a HelloWorld Lightning Component but I'm facing following error: "Challenge Not yet complete... here's what's wrong: The 'HelloWorld' component does not contain the correct code." however I cannot find this error here are my codes
helloWorld.cmp:
<aura:component controller="HelloWorldController" implements="flexipage:availableForAllPageTypes">
apex HelloWorldController :
public with sharing class HelloWorldController {
and js HelloWorldController:
({
The worst thing in this situation is that I check in my org and everything works as it should.
I try to pass module Create a HelloWorld Lightning Component but I'm facing following error: "Challenge Not yet complete... here's what's wrong: The 'HelloWorld' component does not contain the correct code." however I cannot find this error here are my codes
helloWorld.cmp:
<aura:component controller="HelloWorldController" implements="flexipage:availableForAllPageTypes">
<aura:attribute name="greeting" type="String" default="World" />
<lightning:input name="Greeting" label="Greeting" value="{!v.greeting}"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
Hello, {!v.greeting}!
</aura:component><lightning:input name="Greeting" label="Greeting" value="{!v.greeting}"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
Hello, {!v.greeting}!
apex HelloWorldController :
public with sharing class HelloWorldController {
@AuraEnabled
public static User getCurrentUser() {
public static User getCurrentUser() {
return [SELECT Id, FirstName, LastName FROM User WHERE Id = :UserInfo.getUserId() LIMIT 1];
}
}and js HelloWorldController:
({
doInit : function(component, event, helper) {
var action = component.get("c.getCurrentUser");
action.setCallback(this, function(response) {
action.setCallback(this, function(response) {
var user = response.getReturnValue();
component.set("v.greeting", user.FirstName);
})
component.set("v.greeting", user.FirstName);
})
$A.enqueueAction(action);
}
})The worst thing in this situation is that I check in my org and everything works as it should.
i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
http://sfdcmonkey.com (http://sfdcmonkey.com )
All Answers
i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
http://sfdcmonkey.com (http://sfdcmonkey.com )
Is not working for me. Have any other suggestion ?
please respond with jewel if it worked.