mendhak/angular-intro.js

The targetElement doesn't seem to be passed to callback

Closed this issue · 2 comments

Hi,

I am using the latest version of angular-intro.js and the below code print targetElement as undefined.

this.ngIntroService.onAfterChange((targetElement) => {
     console.log('onBeforeChange:', targetElement)
});

I have checked the source code and it seems the targetElement is not passed to callback:

function onAfterChange(cb) {
  return intro.onafterchange(function (targetElement) {
    if(angular.isFunction(cb)) cb(targetElement); --> I had to add `targetElement` to cb
  });
}

Also all others funtions onChange, onBeforeChange etc are not passing targetElement.

thanks for notify
i'll check it

i've updated the example as well

http://plnkr.co/edit/4JdONL?p=preview