{"id":21314489,"url":"https://github.com/polyconseil/jquery-angular-shim","last_synced_at":"2026-06-30T19:31:44.560Z","repository":{"id":89419138,"uuid":"61131922","full_name":"Polyconseil/jquery-angular-shim","owner":"Polyconseil","description":"A local angular, as much as possible.","archived":false,"fork":false,"pushed_at":"2016-08-18T14:21:18.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-03-15T21:17:35.639Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Polyconseil.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-14T14:57:38.000Z","updated_at":"2016-06-14T14:58:13.000Z","dependencies_parsed_at":"2023-03-13T18:09:54.477Z","dependency_job_id":null,"html_url":"https://github.com/Polyconseil/jquery-angular-shim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Polyconseil/jquery-angular-shim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fjquery-angular-shim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fjquery-angular-shim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fjquery-angular-shim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fjquery-angular-shim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Polyconseil","download_url":"https://codeload.github.com/Polyconseil/jquery-angular-shim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fjquery-angular-shim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34981390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-21T18:13:19.043Z","updated_at":"2026-06-30T19:31:44.549Z","avatar_url":"https://github.com/Polyconseil.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"angular-local\n=============\n\nReusable, requirable Angular library.\n\nThe modules may be imported using an `import` or `require` syntax.\n\n.. code-block:: javascript \n\n    import angular from 'jquery-angular-shim'\n\nBootstrapping a local application is now possible:\n\n.. code-block:: html\n\n    \u003c!DOCTYPE html\u003e\n    \u003chtml lang=\"en\"\u003e\n      \u003chead\u003e\n        \u003cmeta charset=\"utf-8\"\u003e\n        \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n        \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\n        \u003ctitle\u003eHolysheets\u003c/title\u003e\n        \u003cscript src=\"https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.js\"\u003e\u003c/script\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n\n        \u003cdiv id=\"myapplication\"\u003e\n          \u003cdiv ui-view=\"\"\u003e\u003c/div\u003e\n        \u003c/div\u003e\n\n      \u003cscript src=\"bundle.js\"\u003e\u003c/script\u003e\n      \u003cscript\u003e\n          console.log(\"Here, 'angular' is angular 1.2\")\n          angular.element(document).ready(function() {\n\n            var item = document.getElementById('myapplication')\n            var appNg = window.__jquery_angular_shim__.angular\n\n            console.log(\"And here, it's the one from myapplication\")\n            appNg.bootstrap(item, ['myapplication']);\n          });\n      \u003c/script\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n\n`jquery-angular-shim` will save any:\n - original AngularJS instance inside \n    `window.__jquery_angular_shim__.originalAngular`\n - original jQuery instance inside \n    `window.__jquery_angular_shim__.originalJQuery`\n\nYou can restore it at the end of your bundle in order not to bother the\nrest of the host webpage too much.\n\nFinally, due to the extremely \"global\" nature of AngularJS v1, it's advised\nto edit your webpack configuration as such::\n\n  {\n    resolve: {\n      alias: {\n        'angular': 'jquery-angular-shim', // Make sure EVERY require to angular gets resolved to that one.\n      }\n    }\n  }\n\n\nTarget implementation (future)\n------------------------------\n\nA better implementation, later, would be to allow various\njquery_angular_shims, namespaced for every app.\n\nThe issue is that we cannot easily configure this from the app; code like:\n\n.. code-block:: javascript\n\n    // With es6 imports, this is executed after the code of the imports and will not work as expected\n    window.__jquery_angular_shim_params__ = {\n        'name': 'my_app',\n        'restoreAngular': false,\n    }\n\n    import angular from 'jquery-angular-shim'\n\ndoes not work since the resulting Webpack bundle will load the dependencies\nbefore executing line 1. Ideas welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyconseil%2Fjquery-angular-shim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyconseil%2Fjquery-angular-shim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyconseil%2Fjquery-angular-shim/lists"}