Results 1 to 5 of 5

Thread: Enable ES6/ES7/ES8 (Beginner Level question)

  1. #1
    Roberto Lopez's Avatar
    Join Date
    Feb 2016
    Location
    Dallas Texas USA
    Posts
    23
    Answers
    3

    Default Enable ES6/ES7/ES8 (Beginner Level question)

    Using ExtJS 6.6.0, Cmd 6.6.0.13

    Created an app like this:

    sencha -sdk ext generate app MyApp lab001

    Add code to app.js (following sencha doc from here under Enable ES6/ES7/ES8).

    code.jpg

    The line in red is where an error is been reported:

    [ERR] C2001: Closure Compiler Error (primary expression expected) -- C:\extjs660\lab001\app.js:44:45

    How do I enable Enable ES6/ES7/ES8?

    I did not change app.json if I have to make changes in it, can somebody please help me describing how to do it?

  2. #2
    Sencha User
    Join Date
    Aug 2017
    Posts
    18
    Answers
    3

    Default

    Hi,

    You have a syntax error.

    Code:
    asyncFunc.then(_ => {x= '&gt'; console.log(x)})

  3. #3
    Roberto Lopez's Avatar
    Join Date
    Feb 2016
    Location
    Dallas Texas USA
    Posts
    23
    Answers
    3

    Default

    Thank you for your reply.

    I just copy the code from this article published by Sencha: https://www.sencha.com/blog/announci...-cmd-6-5-2-ga/

    I tried your suggestion and I am also getting an error.

    Looks like you meant to say:

    asyncFunc().then(_ => {x= '&gt'; console.log(x)})

    right?

  4. #4
    Sencha User
    Join Date
    Apr 2013
    Posts
    913
    Answers
    105

    Default

    Should be:
    Code:
    asyncFunc().then(x => console.log(x));

  5. #5
    Sencha User
    Join Date
    Aug 2017
    Posts
    18
    Answers
    3

    Default

    correct.

    Also if u use the newst version of cmd, your build will transpiled to es5 with zero configuration.

    Quote Originally Posted by hakimio View Post
    Should be:
    Code:
    asyncFunc().then(x => console.log(x));

Similar Threads

  1. Replies: 2
    Last Post: 25 Sep 2018, 5:14 AM
  2. Beginner question
    By gerlis in forum Ext: Discussion
    Replies: 1
    Last Post: 8 Aug 2012, 11:00 AM
  3. Question from a very beginner
    By kabkab in forum Ext: Q&A
    Replies: 3
    Last Post: 20 Nov 2011, 4:03 AM
  4. Beginner question
    By benmaya in forum Ext: Discussion
    Replies: 7
    Last Post: 7 Aug 2011, 6:36 AM
  5. Enable/disable forms/fields depending on user level
    By LeonM in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 7 Jan 2011, 3:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •