[js] move controller to use ES6 class format

enable strict di mode