{"id":15698984,"url":"https://github.com/pgilad/angular-html5","last_synced_at":"2025-10-09T10:09:53.080Z","repository":{"id":17687125,"uuid":"20493032","full_name":"pgilad/angular-html5","owner":"pgilad","description":"Change your ng-attributes to data-ng-attributes for html5 validation","archived":false,"fork":false,"pushed_at":"2019-06-05T08:10:29.000Z","size":31,"stargazers_count":19,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-03T05:32:18.175Z","etag":null,"topics":["angular","cli","html5","w3c"],"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/pgilad.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":"2014-06-04T17:31:23.000Z","updated_at":"2020-09-15T07:44:04.000Z","dependencies_parsed_at":"2022-09-06T00:20:10.263Z","dependency_job_id":null,"html_url":"https://github.com/pgilad/angular-html5","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/pgilad/angular-html5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fangular-html5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fangular-html5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fangular-html5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fangular-html5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgilad","download_url":"https://codeload.github.com/pgilad/angular-html5/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Fangular-html5/sbom","scorecard":{"id":730084,"data":{"date":"2025-08-11","repo":{"name":"github.com/pgilad/angular-html5","commit":"25d6be3007d8e6d9f6d68d9e9c6dcdddf32393b5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T14:09:45.590Z","repository_id":17687125,"created_at":"2025-08-22T14:09:45.590Z","updated_at":"2025-08-22T14:09:45.590Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278560023,"owners_count":26006893,"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-10-06T02:00:05.630Z","response_time":65,"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","cli","html5","w3c"],"created_at":"2024-10-03T19:37:14.969Z","updated_at":"2025-10-09T10:09:53.064Z","avatar_url":"https://github.com/pgilad.png","language":"JavaScript","readme":"# angular-html5\n\n\u003e Change your ng-attributes to data-ng-attributes for HTML5 validation\n\n[![NPM Version](http://img.shields.io/npm/v/angular-html5.svg?style=flat)](https://npmjs.org/package/angular-html5)\n[![NPM Downloads](http://img.shields.io/npm/dm/angular-html5.svg?style=flat)](https://npmjs.org/package/angular-html5)\n[![Build Status](http://img.shields.io/travis/pgilad/angular-html5.svg?style=flat)](https://travis-ci.org/pgilad/angular-html5)\n\nEver tried to run an Angular HTML page into w3c validator? Yeah it's a mess.\n\nHTML5 has a preset definition of valid tag elements, and also allows data-attributes.\nAngular, being as great as it is, allows you set set custom directives, that don't pass the\nw3c validations. Angular default directives come with an option to be named `data-something`.\n\nIf you are like me, it isn't fun using `data-ng-include` or `data-ng-switch` and prefer to use the shorter\nversions. Using this module, you can easily convert the HTML attributes of Angular (and custom prefixes you want) to\nvalid HTML5 tags that start with `data-something`.\n\n**Turn this:**\n```html\n\u003chtml ng-app=\"myApp\"\u003e\n...\n\u003cbody ng-controller=\"MainCtrl\"\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n**Into this:**\n```html\n\u003chtml data-ng-app=\"myApp\"\u003e\n...\n\u003cbody data-ng-controller=\"MainCtrl\"\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n#### \u003cimg src=\"http://www.w3.org/html/logo/downloads/HTML5_Logo_256.png\" alt=\"HTML5 Valid\" width=\"64\" height=\"64\"/\u003e\n\n**angular-html5** looks for `ng-` directives by default and can handle the following cases:\n```html\n\u003c!-- attribute --\u003e\n\u003cANY ng-directive\u003e\n\u003c!-- regular element --\u003e\n\u003cng-directive\u003e\u003c/ng-directive\u003e\n\u003c!-- self closing element --\u003e\n\u003cng-directive /\u003e\n\u003c!-- custom directive prefix --\u003e\n\u003cui-router\u003e\u003c/ui-router\u003e\n\u003c!-- your name prefix --\u003e\n\u003cgilad-cool-loader\u003e\u003c/gilad-cool-loader\u003e\n```\n\nYou can add additional prefixes using the option `customPrefixes`.\n\nThis plugin plays nice with `type=\"text/ng-template\"` and won't break it.\n\n## Install\n\n### Global\n\n```bash\n$ npm install --global angular-html5\n```\n\n### Usage\n\n```bash\n❯ angular-html5 --help\n\n  Usage: angular-html5 [options] \u003cfile\u003e\n\n  Options:\n\n    -h, --help                      output usage information\n    -V, --version                   output the version number\n    -c, --custom-prefix [prefixes]  Optionally add custom prefixes to the list of converted directives.\n\n  Examples:\n\n    $ angular-html5 index.js\n    $ angular-html5 --custom-prefix ui --custom-prefix gijo index.js \u003e ./dist/index.js\n    $ cat index.js | angular-html5 \u003e ./dist/index.js\n```\n\n### Programmatic\n\nInstall with [npm](https://npmjs.org/package/angular-html5)\n\n```bash\n$ npm install --save-dev angular-html5\n```\n\n### Usage\n\n```js\nvar htmlify = require('angular-html5')();\n\nvar str = fs.readFileSync('angular.html', 'utf8');\n\n// test if contents need replacing (testing is quick, replacing is slower)\nvar needsReplace = htmlify.test(str);\nif (needsReplace) {\n    // get the transformed html string with data- attributes\n    str = htmlify.replace(str);\n}\n```\n\n## Usage in build tools\n\n#### [Gulp](https://github.com/gulpjs/gulp) - [gulp-angular-htmlify](https://github.com/pgilad/gulp-angular-htmlify)\n\n#### [Grunt](http://gruntjs.com/) - [grunt-angular-htmlify](https://github.com/pgilad/grunt-angular-htmlify)\n\n## API\n\n```js\nvar htmlify = require('angular-html5')(params);\n```\n\n### API Methods\n\n#### .test(str)\n\nTest whether a string containing HTML has `ng-attributes` that can be transformed\nto `data-ng-attributes`.\n\n**Usage**: `htmlify.test(str)`\n\n**Accepts**: `string`\n\n**Returns**: `Boolean`\n\n#### .replace(str)\n\nReturn a transformed string that contains `data-ng-attributes` or relevant transformed attributes\nfor `customPrefixes`.\n\n**Usage**: `htmlify.replace(str)`\n\n**Accepts**: `string`\n\n**Returns**: `string`\n\n### API Params\n\n`params` is an object that contains the following settings:\n\n#### customPrefixes\n\n**Type**: `Array`\n\n**Default**: `[ ]`\n\nAn array to optionally add custom prefixes to the list of converted directives.\n\nFor example: `['ui-', 'gijo-']`\n\nBy default only `ng-` prefixes are are handled. Any items you add here will be handled as well.\n\n*Note: for this to work - you will need to make sure your directives can load with a `data-` prefix.*\n\n**Example Usage:**\n```js\nvar str = require('angular-html5')({customPrefixes: ['ui-']}).replace(oldStr);\n```\n\n## License\n\nMIT © [Gilad Peleg](https://www.giladpeleg.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgilad%2Fangular-html5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgilad%2Fangular-html5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgilad%2Fangular-html5/lists"}