js files code reuse via parent controller

js files code reuse via parent controller