how to add title, message,buttons to ng-dialog in angular js as we do in JQuery prompt

I am using https://github.com/likeastore/ngDialog#api for Ng Dialog.

I wanted to show a dialog box with the title, message, and the buttons to display.

Thanks in advance.

Answers


With ng-dialog you can use your own created template(with title buttons, messages) etc.. https://github.com/likeastore/ngDialog#template-string

For example:

 ngDialog.openConfirm({template: "<h3>Title<h3> ..."})

or you could use templateCache to make code clean: https://docs.angularjs.org/api/ng/service/$templateCache

$templateCache.put('my-template.html', "html");    
ngDialog.openConfirm({template: 'my-template.html'})

Need Your Help

Cannot create apply function with static language?

scala programming-languages haskell lisp static-typing

I have read that with a statically typed language like Scala or Haskell there is no way to create or provide a Lisp apply function:

GVim taking forever to load when connected to office network

vim

When I load GVim from the Cygwin command line or when I'm not connected to the office network (mapped to U:/) it loads instantaneously. It takes a good minute or so to open when I'm on the network....