• Omar Bensouda Korachi 5
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2
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 

<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}!

apex HelloWorldController : 
public with sharing class HelloWorldController {
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) {
var user = response.getReturnValue();
component.set("v.greeting", user.FirstName);

The worst thing in this situation is that I check in my org and everything works as it should. 
After the end of challenge I am not getting any error but at the same time I am not getting the out put as well. i am only seeing the image.

User-added image