add controller into js file