简体   繁体   English

angularjs用户关于表单提交的反馈消息

[英]angularjs user feedback message on form submission

I have a simple AngularJs app (a form) and after user submit some data, I need to show a confirmation message. 我有一个简单的AngularJs应用程序(一种表单),在用户提交一些数据后,我需要显示一条确认消息。 I need to show the message on a popup like on this page http://ng-admin.marmelab.com/#/posts/edit/12 (click on the Submit button at the bottom 'Save changes') ie show up a popup from outside the window and move up and fade out after 4 seconds. 我需要在此页面http://ng-admin.marmelab.com/#/posts/edit/12这样的弹出窗口中显示消息(单击底部“保存更改”的“提交”按钮),即显示一个从窗口外部弹出,然后向上移动并在4秒钟后消失。

How can I achieve this ? 我该如何实现? Do I need to use Jquery for this ? 我需要为此使用Jquery吗? Can you show me some examples. 你能给我看看一些例子吗? Can I achieve this by using ng-animate ? 我可以使用ng-animate实现吗?

No need to use jquery and I don't think you can achieve this by ng animate. 无需使用jquery,我认为您无法通过ng animate实现此目的。 You can use angular js modules like below. 您可以使用如下所示的angular js模块。

http://beletsky.net/ng-notifications-bar/ http://beletsky.net/ng-notifications-bar/

You can use any number of angular 3rd party libs but angular has nothing built in to provide this for you. 您可以使用任意数量的angular 3rd party库,但是angular没有内置功能可为您提供此功能。 Here is another toast popup : 这是另一个吐司弹出窗口:

https://foxandxss.github.io/angular-toastr/ https://foxandxss.github.io/angular-toastr/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM