gpt4 book ai didi

Angular changes not reflected on server live code(角度变化未反映在服务器实时代码中)

转载 作者:bug小助手 更新时间:2023-10-24 20:24:04 24 4
gpt4 key购买 nike



enter image description here


My changes above in screenshot. Just changed the text to Download PDF before it was something else.

我在上面的屏幕截图的变化。只是改变了文本下载PDF之前,它是别的东西。


Replaced the folder here with the complied code enter image description here

用编译后的代码替换了此处的文件夹


Used this command to compile: ng build --base-href=/parent/ --configuration=production

使用以下命令编译:NGBuild--base-href=/parent/--configuration=Products


I have Angular code. I made changes to it and complied with it. It complied successfully with no errors and when I replace the complied folder in server it does not reflect changes.

我有角度代码。我对它进行了修改,并遵守了它。它成功地编译了,没有错误,当我替换服务器中编译的文件夹时,它没有反映更改。


I tested it out by changing the spelling to make sure I am not making wrong changes or at least the small spelling such as “Ham” to “Han” should reflect as its just text changes but I see no changes.

我通过更改拼写进行了测试,以确保我没有做错误的更改,或者至少像“Ham”到“han”这样的小拼写应该反映为它只是文本更改,但我看不到任何更改。


The process I followed is:

我遵循的流程是:



  1. Make my changes to the file let’s say parent.html

  2. Compile the whole folder that has parent.html which is parent folder.

  3. It creates dist folder and inside dist folder it had parent folder, so I replace the parent folder in live server because in server we have parent folder where I want to make changes, so I replaced it with my parent folder with my changes.


So, what I am doing wrong here or missing something, so it does not reflect changes? I had to change in complied file to reflect the changes which is not best way.

那么,我在这里做错了什么,或者遗漏了什么,所以它没有反映出变化?我不得不在编译后的文件中进行更改以反映更改,这不是最好的方式。


更多回答

On Localhost, Did You see the Change??

在本地主机上,你看到变化了吗??

Yeah I can see the changes on localhost @JensonMJohn

是的,我可以在Localhost@jensonMJohn上看到更改

Try this Command ng build --prod --clear-cache.

尝试使用此命令ng build--prod--lear-cache.

@JensonMJohn I already tried that

@JensonMJohn我已经试过了

Ok. Unless I see Your Code, Proper Solution will get delayed.

好的。除非我看到您的代码,否则正确的解决方案将被延迟。

优秀答案推荐

Just look through the dist folder an look for you changes if they are there probably your server caches the files. If not you maybe need to specify the project in the build command.

只需查看dist文件夹,查找更改,如果它们在那里,可能是您的服务器缓存了这些文件。如果不是,您可能需要在构建命令中指定项目。


更多回答

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com