completed transistion of remaining jquery code in sentences.js to angular