solving the issue of sorting (issue #18)

Hi! , i'm a newbie for angular (and for a javascript) so my solution may be not perfect, anyway i will be very happy if  it will help to somebody...