问题标签 [angular-cli-ghpages]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
24 浏览

angular - Angular GithubPages:如何进行更改

我对 github 页面上的 Angular 应用程序的更改有疑问。我已经将我的 Angular 应用程序部署在 github 页面上angular-cli-ghpages,现在需要进行一些调试。如何更改代码并强制 github 页面部署新版本的应用程序?仅在代码上就足够了git commitgit push还是我应该构建一个新版本的应用程序并使用它来提供服务angular-cli-ghpages

0 投票
1 回答
55 浏览

javascript - 我开发了一个教程应用程序,并按照指南将其托管在 gh-pages 上。为什么现在路由乱了?

应用程序源代码:https ://github.com/shardul-shah/first-angular-app

它适用于 gh-pages ......有点(https://shardul-shah.github.io/first-angular-app/

问题:

  1. 当转到https://shardul-shah.github.io/first-angular-app/时,URL 会自动更改为https://shardul-shah.github.io/first-angular-app/first-angular -应用程序/
  2. 刷新https://shardul-shah.github.io/first-angular-app/first-angular-app/(或任何路线上的任何刷新)会导致白色的空白屏幕。
  3. 当我单击https://shardul-shah.github.io/first-angular-app/first-angular-app/中的“我的商店”时,该应用程序有效,但并非没有。

我看到了 JS 控制台,我发现我也遇到了路由问题。我可以看到路由存在问题,但我一生都无法弄清楚如何解决它。我已经尝试使用 ng 和 ng 的 gh-pages 命令行实用程序进行 4 次重建和保留,但它没有修复它。我对 Angular 和路由的缺乏经验很痛苦。

谁能告诉我如何修复此路由,以使应用程序正常运行并从https://shardul-shah.github.io/first-angular-app/运行?

仅供参考,它适用于 stackblitz,我最初在该应用程序上工作: https ://angular-n2rqei.stackblitz.io和https://stackblitz.com/edit/angular-n2rqei?file=src/app/app.module .ts

谢谢! GitHub 设置(页面)

0 投票
1 回答
19 浏览

git - 使用 git 恢复已删除的本地文件夹

我做了一个 Angular 项目并将其推送到 github 上(我对 git 了解不多)。推送后,我看到只有一个带有右箭头的文件夹,单击它时没有任何结果。所以我想把它取下来再推。所以,通过使用互联网,我找到了这个代码。

git rm -rf folder-name

使用这个,本地的原始文件夹被删除了,现在我很恐慌如何恢复它。

任何帮助和建议都会有所帮助。

0 投票
1 回答
25 浏览

angular - git-upload-pack '.':git-upload-pack:找不到命令致命:无法从远程存储库读取

我正在尝试将 Angular PWA 部署到 gh 页面并在部署时收到此错误:git-upload-pack '.': git-upload-pack: command not found fatal: could not read from remote repository。

请确保您具有正确的访问权限并且存储库存在。

我的脚本是:

有没有人能够解决这个问题?我试过改变我的脚本,改用 angular-cli-ghpages ......总是同样的错误......