{"id":32257643,"url":"https://github.com/sagrawal31/angular-extras","last_synced_at":"2026-02-22T03:02:07.634Z","repository":{"id":58215051,"uuid":"61205365","full_name":"sagrawal31/angular-extras","owner":"sagrawal31","description":"A light weight library to provide some extensions to AngularJS(1) without jQuery.","archived":false,"fork":false,"pushed_at":"2018-03-09T08:35:16.000Z","size":78,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-26T12:55:29.378Z","etag":null,"topics":["angular","angular-directives"],"latest_commit_sha":null,"homepage":"","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/sagrawal31.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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":"2016-06-15T12:12:53.000Z","updated_at":"2018-02-10T08:13:17.000Z","dependencies_parsed_at":"2022-08-31T00:30:29.035Z","dependency_job_id":null,"html_url":"https://github.com/sagrawal31/angular-extras","commit_stats":null,"previous_names":["sagrawal14/angular-extras"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/sagrawal31/angular-extras","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagrawal31%2Fangular-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagrawal31%2Fangular-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagrawal31%2Fangular-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagrawal31%2Fangular-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sagrawal31","download_url":"https://codeload.github.com/sagrawal31/angular-extras/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagrawal31%2Fangular-extras/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29704400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"online","status_checked_at":"2026-02-22T02:00:08.193Z","response_time":110,"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","angular-directives"],"created_at":"2025-10-22T19:35:10.241Z","updated_at":"2026-02-22T03:02:07.629Z","avatar_url":"https://github.com/sagrawal31.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Extras\n\nA light weight library to provide some extensions to Angular without jQuery.\n\n## Usage\n\n### 1. Install via Bower\n\n```shell\nbower install angular-extras --save\n```\n\n### 2. Add the script to your main HTML file (like index.html)\n\nInclude each file based on your need. For example:\n\n```html\n\u003cscript src=\"bower_components/angular-extras/dist/angular-extras-dom.min.js\"\u003e\u003c/script\u003e\n```\n\n## Description\n\n### DOM Extras\n\n```html\n\u003cscript src=\"bower_components/angular-extras/dist/angular-extras-dom.min.js\"\u003e\u003c/script\u003e\n```\n\nThis module provides some DOM related helper methods like jQuery but without using jQuery. All of the following\nmethods return the instance of jQLite.\n\n#### 1. find(selector)\n\nGet the descendant of element in the current set of matched elements, filtered by a selector.\n\n```javascript\nangular.find('div');        // Get the first DIV element in the body\nsomeDomeElementInDirective.find('input');       // Find the first input element in the directive's element\n```\n\n#### 2. findAll(selector)\n\n```javascript\nangular.findAll('div');        // Get all the descendant DIV elements in the body\nsomeDomeElementInDirective.findAll('input');       // Find all the descendant input elements in the directive's element\n```\n\n#### 3. parents(selector)\n\n```javascript\nsomeDomeElementInDirective.parents('div.foo');       // Find all the parent DIV elements with class \"foo\"\n```\n\n#### 4. closest(selector)\n\n```javascript\nsomeDomeElementInDirective.closest('div.foo');       // Find all the parent DIV elements including self with class \"foo\"\n```\n\n----------\n\n### Form Directives\n\n```html\n\u003cscript src=\"bower_components/angular-extras/dist/angular-extras.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/angular-extras/dist/angular-extras-form-directives.min.js\"\u003e\u003c/script\u003e\n```\n\nInclude the module:\n\n```javascript\nangular.module('myApp', ['...', 'angular.extras.form.directives'])\n```\n\n#### 1. autofocus\n\nThe attribute `autofocus` of HTML5 only works when the page load but does not focus the input element when the\ncontents are loaded dynamically (like when views are loaded via route or `ng-include`).\n\n```html\n\u003cinput name=\"email\" autofocus type=\"email\" /\u003e\n```\n\n#### 2. focus-on\n\nFocuses the DOM element based on the expression.\n\n```html\n\u003cinput type=\"text\" focus-on=\"isFocus\" /\u003e\n```\n\n----------\n\n### Page Directives\n\n```html\n\u003cscript src=\"bower_components/angular-extras/dist/angular-extras.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/angular-extras/dist/angular-extras-page-directives.min.js\"\u003e\u003c/script\u003e\n```\n\nInclude the module:\n\n```javascript\nangular.module('myApp', ['...', 'angular.extras.page.directives']);\n```\n\n#### body-classes\n\nSet classes on the `body` element from anywhere through your DOM element.\n\n```html\n\u003cdiv body-classes=\"'new-class another-class' {{someScopeVariable}}\"\u003e\u003c/div\u003e\n```\n\n#### email\n\nConverts plain HTML email text to a email link.\n\n```html\n\u003cemail\u003ejohn@example.com\u003c/email\u003e\n\u003cemail\u003e{{user.email}}\u003c/email\u003e\n```\n\n#### page-title\n\nSet the page's `\u003ctitle\u003e` value from any DOM element.\n\n```html\n\u003cdiv page-title=\"Users page\"\u003e\u003c/div\u003e  \u003c!-- Will set \u003ctitle\u003eUsers page\u003c/title\u003e --\u003e\n\u003cdiv page-title\u003eFriends page\u003c/div\u003e  \u003c!-- Will set \u003ctitle\u003eFriends page\u003c/title\u003e --\u003e\n```\n\n#### url\n\nConverts plain HTML url text to the link.\n\n```html\n\u003curl\u003ehttps://google.com\u003c/url\u003e\n\u003curl\u003e{{user.linkedin}}\u003c/url\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagrawal31%2Fangular-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagrawal31%2Fangular-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagrawal31%2Fangular-extras/lists"}