added test for CreateCtrl.submit(), replace window object with $window service