Skip to content

Commit

Permalink
Merge pull request #113 from fluix/issue-112/fix-incompatibility-ng12
Browse files Browse the repository at this point in the history
Issue 112: Fix incompatibility Angular 12 and ngUpgrade
  • Loading branch information
endway authored Jun 22, 2021
2 parents 253bd88 + f5f76cd commit 0241abf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng1-shift",
"version": "0.1.0",
"version": "0.1.1",
"description": "Angular 1.5+ decorators for writing Angular2 like.",
"files": [
"dist"
Expand Down
8 changes: 7 additions & 1 deletion src/decorators/component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import {DeclarationType} from "../../models/declaration-type";
import {Metakeys} from "../../models/metakeys";
import {replaceTwoWayBindings} from "./helpers";

export function Component(config?: {selector?: string, template?: string}): ClassDecorator {
interface ComponentConfig {
selector?: string;
template?: string;
styles?: Array<any>; // added for compatibility with Angular12 with ngUpgrade
}

export function Component(config?: ComponentConfig): ClassDecorator {
return function (target: any) {
if (config) {
if (config.template) {
Expand Down

0 comments on commit 0241abf

Please sign in to comment.