### Force Update All Project Libraries by Reinstallation
Source: https://ng-alain.com/docs/upgrade/zh
This method ensures all project dependencies are updated to their latest compatible versions by first removing the `node_modules` directory and `yarn.lock` file, then performing a clean installation using `yarn`. While effective, it carries a risk of introducing breaking changes from third-party libraries.
```JavaScript
yarn
```
--------------------------------
### Manually Update @delon Library Versions and Reinstall Dependencies
Source: https://ng-alain.com/docs/upgrade/zh
This method involves directly editing the `package.json` file to update the version numbers of all `@delon/` prefixed libraries to their desired latest versions. After modifying the version numbers, the `yarn` command is executed to fetch and install the updated dependencies.
```JSON
"@delon/theme": "^12.0.0"
```
```JavaScript
yarn
```
--------------------------------
### Upgrade NG-ALAIN Scaffolding via Angular CLI
Source: https://ng-alain.com/docs/upgrade/zh
The recommended method for upgrading NG-ALAIN, especially for minor version updates. This command leverages the Angular CLI's built-in update mechanism to manage `@delon/*` library versions automatically.
```Angular CLI
ng update ng-alain
```
--------------------------------
### Angular Component Export Pattern
Source: https://ng-alain.com/docs/new-component/zh
Illustrates how to consolidate multiple component exports from an `index.ts` file, providing a single entry point for importing related components, which is useful for complex component structures.
```TypeScript
// main.component.ts
export class MainComponent {}
// sub.component.ts
export class SubComponent {}
// index.ts
export MainComponent from './main.component';
export SubComponent from './sub.component';
```
--------------------------------
### Using Angular Image Wrapper Component in Template
Source: https://ng-alain.com/docs/new-component/zh
Illustrates how to integrate the `image-wrapper` component into an Angular template. It shows how to pass data to the component using property binding for `src` and `desc` attributes, enabling dynamic content display.
```HTML