使用angularjs阅读内容

时间:2017-06-14 15:38:50

标签: javascript html angularjs

我正在尝试点击URL并使用angularjs下载文件。 以下是我提到的链接并采用了代码: how to read and write url content into a file using angular js

我的代码演示here

我从https://github.com/eligrey/FileSaver.js

获取了FileSaver.js

js code:

public class MyViewModel
{
    public string Comments {get;set;}
}

public class TTHController : Controller
  {
    // GET: Text_To_Hex
    public ActionResult Index()
    {
      return View();
    }

    [HttpPost]
    public ActionResult MyAction(MyViewModel model)
    {
        //Do class stuff
        //The comments will already be bound to the model in your post.
        //Just redirect passing in the same model.

        return RedirectToAction("Index", model);
    }

有什么建议吗?我想点击https网址并阅读内容/下载文件。

0 个答案:

没有答案