Updates the ng-directive snippet to use better types.