如何检查angularjs中是否存在文件 [英] how to check that a file is exists or not in angularjs

查看:150
本文介绍了如何检查angularjs中是否存在文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本文件



firstTime.txt



在我项目的根目录中。现在在AngualrJS的运行功能中我想检查这个文件是否可用?如果可用则删除。



**是否可以检查文件是否存在并在angularJS的运行函数中删除它?**

i have a text file

firstTime.txt

in root directory of my project. Now in AngualrJS's run function i want to check that is this file available or not ?? if available then delete.

**is the possible to check that a file is exists or not and delete it in angularJS' run function?**

推荐答案

AngularJS是一个JavaScript库,为此它在应用程序的客户端运行...另一侧的文本文件位于服务器端。这是你无法检查或删除它的一个原因...

网页的另一个原因 - 浏览器内部根本没有IO功能,无法与本地(客户端)交互存储。他们可以使用某些服务器端解决方案与远程(服务器)存储进行交互,如PHP,ASP.NET或其他...
AngularJS is a JavaScript library, and for that it runs on the client side of your application...The text file on the other side is on the server side. This is one reason why you can't check or delete it...
The other reason that web pages - inside the browser has not IO functions at all and can not interact with the local (client) storage. They can interact with the remote (server) storage using some server-side solution, like PHP, ASP.NET or others...


这篇关于如何检查angularjs中是否存在文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆