How can I write this piece of the code in AnguarJs ?
Particularly the animation part (easeOutCirc
) used in this example:
$(document).ready(function () {
function addCircle() {
var $circle = $('<div class="circle"></div>');
$circle.animate({
'width': '300px',
'height': '300px',
'margin-top': '-150px',
'margin-left': '-150px',
'opacity': '0'
}, 4000, 'easeOutCirc');
$('body').append($circle);
setTimeout(function __remove() {
$circle.remove();
}, 4000);
}
addCircle();
setInterval(addCircle, 1200);
});
I think you could use something like this? https://docs.angularjs.org/api/ngAnimate