question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is ES6 compatibility supported?

See original GitHub issue

Hi!

Using the https://github.com/AngularClass/NG6-starter we found some issues using this on the controller and $ctrl on the template, so we end up using a non pretty hack: this.$scope

       $scope.query.offset = $scope.query.page - 1;
       $scope.promise = $http.get('/api/things', {params: $scope.query})
         .then((response) => {
           $scope.totalCount = response.data.meta.paging.total_count;
           $scope.assessments = response.data.assessments;
         });

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
fatorecommented, Jan 22, 2017

I’ve struggled with that as well…

In the end the less ugly of the hacks was to bind my method in the class constructor:

class Controller {
  constructor() {
    this.test = 'It works';
    this.updateTable = this.updateTable.bind(this);
  }

  updateTable() {
    console.log(this.test);
  }
}
0reactions
v1nc3n4commented, Mar 28, 2017

Hi all,

I encountered exactly the same issue today, but reading this discussion, it seems a workaround ‘only’ has been identified, and the issue was closed, though it is not fixed or handled in this project.

To me, the issue shall be reopened until a clear answer is given: does md-data-table supports or will support ES6 in a next release?

Thanks in advance for your answer. BR, Vincent

Read more comments on GitHub >

github_iconTop Results From Across the Web

"es6" | Can I use... Support tables for HTML5, CSS3, etc
As ES6 refers to a huge specification and browsers have various levels of support, "Supported" means at least 95% of the spec is...
Read more >
ECMAScript 6 compatibility table
Feature name▻ Current browser 98% ES6 Trans‑ piler 25% Trace... Optimisation Optimisation Optimisation Optimi... §proper tail calls (tail call optimisation)▻ 0/2 0/2 0/2 §direct recursionc No...
Read more >
JavaScript Versions - W3Schools
ECMAScript 1 - 6 is fully supported in all modern browsers. Browser Support for ES5 (2009). Browser, Version, From Date. Chrome, 23, Nov...
Read more >
Browser Compatibility of ECMAScript 2015 (ES6) on Internet ...
ECMAScript 2015 (ES6) is Partially Supported on Internet Explorer 11. If you use ECMAScript 2015 (ES6) and your users are using Internet ...
Read more >
Why You Should Use ES6 - ITNEXT
Take a look at this chart. All the current browsers have full support to ES6. Well if you take a closer look you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found