{"id":20314357,"url":"https://github.com/normandy72/dependency-injection","last_synced_at":"2025-09-12T20:37:30.190Z","repository":{"id":153902748,"uuid":"585107343","full_name":"Normandy72/Dependency-Injection","owner":"Normandy72","description":"How Dependency Injection works in Javascript. Coursera course \"Single Page Web Applications with AngularJS\" by Yaakov Chaikin","archived":false,"fork":false,"pushed_at":"2023-01-04T11:48:39.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-25T01:28:50.914Z","etag":null,"topics":["angular","angularjs","html","html5","javascript","js"],"latest_commit_sha":null,"homepage":"","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/Normandy72.png","metadata":{"files":{"readme":"README.md","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":"2023-01-04T10:37:22.000Z","updated_at":"2023-01-04T11:52:28.000Z","dependencies_parsed_at":"2023-05-06T16:47:57.221Z","dependency_job_id":null,"html_url":"https://github.com/Normandy72/Dependency-Injection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Normandy72/Dependency-Injection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FDependency-Injection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FDependency-Injection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FDependency-Injection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FDependency-Injection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Normandy72","download_url":"https://codeload.github.com/Normandy72/Dependency-Injection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FDependency-Injection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274873613,"owners_count":25365824,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"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":["angular","angularjs","html","html5","javascript","js"],"created_at":"2024-11-14T18:14:54.972Z","updated_at":"2025-09-12T20:37:30.150Z","avatar_url":"https://github.com/Normandy72.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Sequence\n1. add main files\n2. add ng-app=\"module_name\" attribute\n3. add script tags into head tag\n4. add ng-controller=\"controller_name\" attribute into div tag\n5. add ng-model=\"model_name\" attribute into input tag\n6. create IIFE in app.js and add 'use strict'\n7. create angular.module\n8. create .controller\n9. define function for controller\n10. add $filter in function parameters (allow create filter functions)\n11. add property upper to $scope (upper is a function that convert all chars in uppercase)\n12. create function upCase using $filter service named 'uppercase'\n13. for $scope.name call upCase function with name as a parameter for function\n14. add ng-blur (when textbox lose focus) attribute, it's value is 'upper();' function\n\n***\n##### Protecting Dependency Injection from Minification\n###### 1st opportunity\n15. create array from second parameter in controller\n16. add in array $scope and filter (it's tell Angular in which order should appear this arguments in function DIController)\n###### 2nd opportunity\n17. create function inside controller instead out of controller\n###### 3rd opportunity (best)\n18. create $inject - property of DIController. It's an array that contains 2 elements: scope and filter \n\n***\nhttps://www.javascriptminifier.com/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormandy72%2Fdependency-injection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnormandy72%2Fdependency-injection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormandy72%2Fdependency-injection/lists"}