leocaseiro / angular-chosen

AngularJS Chosen directive is an AngularJS Directive that brings the Chosen jQuery in a AngularJS way
http://leocaseiro.github.io/angular-chosen/
MIT License
682 stars 248 forks source link

Abandon coffeescript in favor of ES6 #255

Open VanTanev opened 5 years ago

VanTanev commented 5 years ago

I propose rewriting the module in ES6 for version 2.0 Honestly, dealing with coffee script is a bigger distraction than it's worth.

leocaseiro commented 5 years ago

I totally agree. IMO I never really liked coffeescript. It was more just a challenge.

Happy to use es6 or TS. But TS will be confused with Angular 2-6

andresgardiol commented 5 years ago

It would be great to be able to use chosen with es6 modules. Will you rewrite it by chance?

VanTanev commented 5 years ago

@andresgardiol angular-chosen is separate from chosen-js. Even if we rewrote angular-chosen to be compatible with what you mean to be (I assume) browser es6 modules, chosen-js itself is not, and we cannot rewrite it.

However, even the current version of both angular-chosen and chosen-js are compatible with es6 imports, as handled by WebPack.

andresgardiol commented 5 years ago

Thanks for your answer. Can you tell me how you import angular-chosen module with es6? I had some problems to do so.

VanTanev commented 5 years ago

This really isn't the place, but 1 short example

import 'jquery'
import 'chosen-js'
import 'angular-chosen-localytics'
import angular from 'angular'

angular.module('app', ['localytics.directives'])