5 lines
35 KiB
JSON
5 lines
35 KiB
JSON
|
{
|
||
|
"id": "api/upgrade/static/UpgradeComponent",
|
||
|
"title": "UpgradeComponent",
|
||
|
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/upgrade\", \"name\": \"@angular/upgrade\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/upgrade/static\", \"name\": \"@angular/upgrade/static\" } },\n { \"@type\": \"ListItem\", \"position\": 4, \"item\": { \"@id\": \"https://angular.io/api/upgrade/static/UpgradeComponent\", \"name\": \"UpgradeComponent\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/upgrade\">@angular/upgrade</a> > <a href=\"api/upgrade/static\">@angular/upgrade/static</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/upgrade/static/src/upgrade_component.ts?message=docs(upgrade)%3A%20describe%20your%20change...#L29-L298\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/upgrade/static/src/upgrade_component.ts#L29-L298\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header class=\"api-header\">\n <h1 id=\"upgradecomponent\">UpgradeComponent<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/upgrade/static/UpgradeComponent#upgradecomponent\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label directive\">directive</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section class=\"short-description\">\n <p>A helper class that allows an AngularJS component to be used from Angular.</p>\n\n <p><a href=\"api/upgrade/static/UpgradeComponent#description\">See more...</a></p>\n </section>\n \n \n \n \n\n <h2 id=\"ngmodules\">NgModules<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/upgrade/static/UpgradeComponent#ngmodules\"><i class=\"material-icons\">link</i></a></h2>\n<ul class=\"ngmodule-list\">\n\n</ul>\n\n\n \n\n\n \n\n\n\n\n\n \n\n\n \n <section class=\"description\">\n <h2 id=\"description\">Description<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/upgrade/static/UpgradeComponent#description\"><i class=\"material-icons\">link</i></a></h2>\n <p><em>Part of the <a href=\"api?query=upgrade%2Fstatic\">upgrade/static</a>\nlibrary for hybrid upgrade apps that support AOT compilation.</em></p>\n<p>This helper class should be used as a base class for creating Angular directives\nthat wrap AngularJS components that need to be \"upgraded\".</p>\n\n <h3 id=\"examples\">Examples<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/upgrade/static/UpgradeComponent#examples\"><i class=\"material-icons\">link</i></a></h3>\n<p>Let's assume that you have an AngularJS component called <code>ng1Hero</code> that needs\nto be made available in Angular templates.</p>\n<code-example path=\"upgrade/static/ts/full/module.ts\" region=\"ng1-hero\">\n// This AngularJS component will be \"upgraded\" to be used in Angular\nng1AppModule.component('ng1Hero', {\n bindings: {hero: '<', onRemove: '&'},\n transclude: true,\n template: `<div class=\"title\" ng-transclude></div>\n <h2>{{ $ctrl.hero.name }}</h2>\n <p>{{ $ctrl.hero.description }}</p>\n <button ng-click=\"$ctrl.on
|
||
|
}
|