grunt js injector error for generator-angularjs-cordova

To avoid that you could configure grunt injector to work with default grunt line endings:

injector: {
options: {
lineEnding: grunt.util.linefeed
},
...
}

Doing that, you will have to configure your Git line endings setting in case you work on different platforms. Assuming you are on Windows and pulling a file from Linux, you will obtain after the injection process a mixed LF and CR/LF file (LF in all the HTML file and CR/LF bewteen <!– injector:js –> tags) and the grunt-build plugin will not work.

You can use this Sublime Text plugin to see line endings on your file.