Wednesday, October 5, 2016

Destructuring

Destructuring makes code readable

// We could use this directly, but the parameter names won't be obvious
//      EmployeeViewResource.get($state.params)
            
// So let's do this:
const {employeeId,userId} = $state.params;

EmployeeViewResource.get({employeeId, userId}).$promise.then(result =>

No comments:

Post a Comment