Small memory made in AngularJS