Skillpedia
برمجة عامة48k · #3746

angular-migration

ما الذي تفعله

تساعدك هذه المهارة على تحديث شيفرتك من نظام قديم يُسمى AngularJS إلى نظام أحدث يُسمى Angular. وترشدك إلى التغييرات اللازمة في أجزاء من تطبيقك، مثل المكونات وطريقة تواصلها.

متى تستخدمها

  • ✓عندما يكون لديك مشروع مبني بـ AngularJS وتريد ترقيته إلى Angular.
  • ✓إذا احتجت إلى أن يعمل موقعك مع إصدارات Angular القديمة والجديدة معًا.
  • ✓لتحويل الأجزاء القديمة من شيفرتك (التوجيهات) إلى أجزاء حديثة (مكونات).

رابط المهارة

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/angular-migration/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/angular-migration/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“كيف أنقل تطبيقي من AngularJS إلى Angular؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تحلل الأداة شيفرتك القديمة، وتقترح طريقة لإعادة كتابة أجزاء منها للنظام الجديد. ويمكنها المساعدة في إعداد وضع «هجين» تعمل فيه الأنظمة القديمة والجديدة معًا أثناء الانتقال.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Supporting material availability

This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:

  • <support-root>/references/hybrid-mode.md
  • <support-root>/references/component-migration.md
  • <support-root>/references/dependency-injection.md
  • <support-root>/references/routing.md
  • <support-root>/assets/hybrid-bootstrap.ts
  • <support-root>/assets/migration-timeline.md
  • <support-root>/scripts/analyze-angular-app.sh

Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.

Angular Migration

Master AngularJS to Angular migration, including hybrid apps, component conversion, dependency injection changes, and routing migration.

Use this skill when

  • Migrating AngularJS (1.x) applications to Angular (2+)
  • Running hybrid AngularJS/Angular applications
  • Converting directives to components
  • Modernizing dependency injection
  • Migrating routing systems
  • Updating to latest Angular versions
  • Implementing Angular best practices

Do not use this skill when

  • You are not migrating from AngularJS to Angular
  • The app is already on a modern Angular version
  • You need only a small UI fix without framework changes

Instructions

  1. Assess the AngularJS codebase, dependencies, and migration risks.
  2. Choose a migration strategy (hybrid vs rewrite) and define milestones.
  3. Set up ngUpgrade and migrate modules, components, and routing.
  4. Validate with tests and plan a safe cutover.

Safety

  • Avoid big-bang cutovers without rollback and staging validation.
  • Keep hybrid compatibility testing during incremental migration.

Migration Strategies

1. Big Bang (Complete Rewrite)

  • Rewrite entire app in Angular
  • Parallel development
  • Switch over at once
  • Best for: Small apps, green field projects

2. Incremental (Hybrid Approach)

  • Run AngularJS and Angular side-by-side
  • Migrate feature by feature
  • ngUpgrade for interop
  • Best for: Large apps, continuous delivery

3. Vertical Slice

  • Migrate one feature completely
  • New features in Angular, maintain old in AngularJS
  • Gradually replace
  • Best for: Medium apps, distinct features

Hybrid App Setup

// main.ts - Bootstrap hybrid app
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { UpgradeModule } from '@angular/upgrade/static';
import { AppModule } from './app/app.module';

platformBrowserDynamic()
  .bootstrapModule(AppModule)
  .then(platformRef => {
    const upgrade = platformRef.injector.get(UpgradeModule);
    // Bootstrap AngularJS
    upgrade.bootstrap(document.body, ['myAngularJSApp'], { strictDi: true });
  });
// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { UpgradeModule } from '@angular/upgrade/static';

@NgModule({
  imports: [
    BrowserModule,
    UpgradeModule
  ]
})
export class AppModule {
  constructor(private upgrade: UpgradeModule) {}

  ngDoBootstrap() {
    // Bootstrapped manually in main.ts
  }
}

Component Migration

AngularJS Controller → Angular Component

// Before: AngularJS controller
angular.module('myApp').controller('UserController', function($scope, UserService) {
  $scope.user = {};

  $scope.loadUser = function(id) {
    UserService.getUser(id).then(function(user) {
      $scope.user = user;
    });
  };

  $scope.saveUser = function() {
    UserService.saveUser($scope.user);
  };
});
// After: Angular component
import { Component, OnInit } from '@angular/core';
import { UserService } from './user.service';

@Component({
  selector: 'app-user',
  template: `
    <div>
      <h2>{{ user.name }}</h2>
      <button (click)="saveUser()">Save</button>
    </div>
  `
})
export class UserComponent implements OnInit {

…
الأسئلة الشائعة

ما هما AngularJS وAngular؟

AngularJS إصدار أقدم من إطار عمل لبناء المواقع، وAngular هو الإصدار الأحدث والحديث.

ما هو التطبيق «الهجين»؟

هو تطبيق يستخدم النظامين القديم (AngularJS) والجديد (Angular) في الوقت نفسه، مما يتيح نقلًا تدريجيًا.

ما هي «المكونات» و«التوجيهات»؟

التوجيهات هي لبنات البناء في AngularJS، والمكونات هي ما يقابلها وهي لبنات أحدث في Angular.

التفاصيل

الوصف الأصلي من المؤلف

Master AngularJS to Angular migration, including hybrid apps, component conversion, dependency injection changes, and routing migration.

repo: sickn33/agentic-awesome-skills

الشعبية

نجوم GitHub
48k
الترتيب
#3746
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة