Combining Angular with require.js by using a 'register' pattern