如何在Plunker中修改Angular版本?(从5.2.6切换至5.2.5)
How to Downgrade Angular from 5.2.6 to 5.2.5 in Plunker
Got it, let's walk through how to switch your Angular version in Plunker step by step—it's straightforward once you know where to look!
Here's what you need to do:
- Open your Plunker project, then locate the
index.htmlfile in the left-side file panel. - Inside
index.html, you’ll find a set of<script>tags that load Angular’s core libraries. They’ll look something like this:<script src="https://unpkg.com/@angular/core@5.2.6/bundles/core.umd.js"></script> <script src="https://unpkg.com/@angular/common@5.2.6/bundles/common.umd.js"></script> <script src="https://unpkg.com/@angular/compiler@5.2.6/bundles/compiler.umd.js"></script> <script src="https://unpkg.com/@angular/platform-browser@5.2.6/bundles/platform-browser.umd.js"></script> <script src="https://unpkg.com/@angular/platform-browser-dynamic@5.2.6/bundles/platform-browser-dynamic.umd.js"></script> - Change the version number
@5.2.6to@5.2.5in every Angular-related script URL. Make sure you update all of them—mixing versions can cause unexpected bugs. Your modified tags should look like this:<script src="https://unpkg.com/@angular/core@5.2.5/bundles/core.umd.js"></script> <script src="https://unpkg.com/@angular/common@5.2.5/bundles/common.umd.js"></script> <script src="https://unpkg.com/@angular/compiler@5.2.5/bundles/compiler.umd.js"></script> <script src="https://unpkg.com/@angular/platform-browser@5.2.5/bundles/platform-browser.umd.js"></script> <script src="https://unpkg.com/@angular/platform-browser-dynamic@5.2.5/bundles/platform-browser-dynamic.umd.js"></script> - If your project uses additional Angular packages (like
@angular/formsor@angular/router), find their corresponding<script>tags and update the version number to5.2.5as well. - Save your changes (Plunker usually auto-saves, but it’s safe to click the save button at the top to confirm).
- Refresh the page, and your project will now run on Angular 5.2.5!
Pro tip: Use the search function in index.html to find all instances of @angular—this ensures you don’t miss any version numbers to update.
内容的提问来源于stack exchange,提问作者BBaysinger
相关产品推荐
相关产品推荐

