can't I use html element in notify?
notify.info('<a href="www.google.com", target='_blank'>');
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
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.