Adapted the implementation and unit test from ui-if in AngularUI
Added newline to the end of ngRemove.js