【问题标题】:Is it possible to serve angular 2+ application directly from file system without server ? In Android or Xamarin WebView?是否可以在没有服务器的情况下直接从文件系统提供 Angular 2+ 应用程序?在 Android 或 Xamarin WebView 中?
【发布时间】:2019-01-30 12:06:56
【问题描述】:

我将这个 Angular 2+ 应用程序托管在 IIS 或某些服务器中。我将在我的 Android/Xamarin 应用程序的 WebView 中使用这个应用程序。我知道我们可以嵌入静态 html 文件或将静态 html 文件从 Android 的文件系统提供给 Xamarin 的 webview,而无需托管它。由于它具有无法提供离线应用程序等缺点,我想知道,如果我们可以在不托管在服务器中的情况下提供类似于静态 html 的 Angular 2+ 应用程序? (与服务器一样,对于 SPA 应用程序,我们可以启用重定向规则以在 http 请求路由的情况下为 index.html 提供服务)。

【问题讨论】:

    标签: android ios angular xamarin webview


    【解决方案1】:

    Android 模拟器提供 url 以在 10.0.2.2:port 加载内容

    所以你可以运行 Angular cli server/iis 和 只需在具有相同端口号的 iis 或 webpack 的模拟器中加载应用程序

    【讨论】:

      猜你喜欢
      • 2016-09-04
      • 1970-01-01
      • 2020-05-09
      • 1970-01-01
      • 2015-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-22
      相关资源
      最近更新 更多