{"id":15825454,"url":"https://github.com/patrickjs/ng2for1","last_synced_at":"2025-04-01T09:39:02.058Z","repository":{"id":41074922,"uuid":"31178328","full_name":"PatrickJS/ng2for1","owner":"PatrickJS","description":"angular1 hacks for angular2 style coding","archived":false,"fork":false,"pushed_at":"2015-03-02T20:16:56.000Z","size":624,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-05T09:20:50.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PatrickJS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-22T20:14:03.000Z","updated_at":"2019-08-13T16:03:49.000Z","dependencies_parsed_at":"2022-08-29T01:01:05.175Z","dependency_job_id":null,"html_url":"https://github.com/PatrickJS/ng2for1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickJS%2Fng2for1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickJS%2Fng2for1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickJS%2Fng2for1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickJS%2Fng2for1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatrickJS","download_url":"https://codeload.github.com/PatrickJS/ng2for1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620125,"owners_count":20806716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T09:20:34.914Z","updated_at":"2025-04-01T09:39:02.033Z","avatar_url":"https://github.com/PatrickJS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng2for1\nangular1 hacks for angular2 style coding\n\n## Example\n```es6\nimport angular from 'exports?window.angular!angular';\n\nfunction HelloWorld({ Component, Template }) {\n\n  Component({\n    selector: 'helloWorld',\n    bind: {\n      'yoAttr': '='\n    },\n    event: {\n      'click': 'clicking'\n    },\n    lifecycle: {\n      start: 'start',\n      before: 'before',\n      ready: 'ready',\n      destory: 'destory'\n    }\n  });\n\n  Template({\n    inline: `\n      \u003cdiv\u003e\n       Test tet {{ yolo }} {{ yoAttr }} {{ kool }}\n      \u003c/div\u003e\n    `\n  });\n  class World {\n    constructor($scope) {\n      console.log('swag', $scope);\n      this.yolo = 'yolo';\n      $scope.kool = 'kool';\n    }\n    yolo() {\n\n    }\n\n    clicking($event) {\n      console.log('yolo', this.yolo, $event);\n      if (this.yolo === 'lol') {\n        this.yolo = 'yolo';\n      } else {\n        this.yolo = 'lol';\n      }\n    }\n\n    start() {\n      console.log('Start', arguments);\n    }\n    before() {\n      console.log('Before', arguments);\n    }\n    ready() {\n      console.log('Ready', arguments);\n    }\n    destory() {\n      console.log('Destory', arguments);\n    }\n  }\n\n\n  return World;\n};\n\nexport default angular.module('component', []).component('helloWorld', HelloWorld);\n```\n\n## Todo\n\n* remove state out of annotation service\n* create a better annotation service\n* fix lifecyle\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickjs%2Fng2for1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickjs%2Fng2for1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickjs%2Fng2for1/lists"}