Pastebin clone in AngularJS