Draw functionality has been implemented

The problem was due to ng repeat.
alert helps to see the problem