Can't I use html element in notify?

can't I use html element in notify?

notify.info('<a href="www.google.com", target='_blank'>');

Hi whoami,

You can use notify.directive, which takes an object that has a template (AngularJS HTML), and a controller for event handling.

Example:

const directive = {
  template: "<button ng-click='hello.goElastic()'>Elastic.co</button>",
  controllerAs: 'hello',
  controller($window) {
    this.goElastic = () => $window.open('https://www.elastic.co');
  }
};
notify.directive(directive, {
  type: 'banner',
  lifetime: Infinity,
  actions: [
    {...}
  ]
});

You can also use simple Markdown syntax in the content of any notification type, which would be a lot easier :smiley:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.