Update to use controller as syntax and promises