{"id":22237478,"url":"https://github.com/ng-milk/angular-animate-model-change","last_synced_at":"2025-07-27T22:33:09.175Z","repository":{"id":58223893,"uuid":"47623324","full_name":"ng-milk/angular-animate-model-change","owner":"ng-milk","description":"Angular directive to animate elements when a model changes, demo here: http://ng-milk.github.io/angular-animate-model-change/","archived":false,"fork":false,"pushed_at":"2015-12-18T22:10:06.000Z","size":18,"stargazers_count":9,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-10T16:41:33.135Z","etag":null,"topics":["angularjs","css","javascript"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/ng-milk.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-12-08T13:19:40.000Z","updated_at":"2016-12-09T08:05:43.000Z","dependencies_parsed_at":"2022-08-31T03:01:38.842Z","dependency_job_id":null,"html_url":"https://github.com/ng-milk/angular-animate-model-change","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-milk%2Fangular-animate-model-change","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-milk%2Fangular-animate-model-change/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-milk%2Fangular-animate-model-change/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-milk%2Fangular-animate-model-change/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ng-milk","download_url":"https://codeload.github.com/ng-milk/angular-animate-model-change/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227843600,"owners_count":17827987,"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":["angularjs","css","javascript"],"created_at":"2024-12-03T03:10:01.558Z","updated_at":"2024-12-03T03:10:02.637Z","avatar_url":"https://github.com/ng-milk.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular 'animate on model change' directive\n![Angular animate on model change demo](https://ngmilk.rocks/content/images/2015/12/angular-model-change-animation.gif)\n\n\n### [See a demo](http://ng-milk.github.io/angular-animate-model-change/)\nA directive that will help you animate elements when the model updates with some nifty CSS, ng-animate not needed. Read more about it [here](https://ngmilk.rocks/2015/12/18/animate-elements-when-a-model-changes-in-angularjs/).\n\n\n## Usage\n1. Include `ng-animate-model-change.js`.\n2. **Optional**: Include `ng-animate-model-change.css` (just if you don't plan to add any CSS of your own).\n3. Add `dm.animateModelChange` as a dependency to your app.\n4. Profit!\n\n## Bower\nInstallable via `bower`:\n\n```bash\nbower install ng-animate-model-change\n```\n\n## Example\n\n```html\n[...]\n\u003csection animate-model-change class=\"number\" model=\"{{model}}\"\u003e\u003c/section\u003e\n[...]\n```\n\n...and some nice styling:\n\n```css\n.number{\n  transition:\n    0.3s color ease,\n    0.3s transform ease;\n}\n\n.number--increment{\n  color: green;\n  transform: scale(1.6);\n}\n\n.number--decrement{\n  color: red;\n  transform: scale(0.8);\n}\n```\n\nYou can see more examples in [index.html](https://github.com/ng-milk/angular-animate-model-change/blob/master/index.html).\n\n\n## Configuration\nYou can configure the the timeout duration \u0026 increment, decrement and non-number classes (for those situations when the model update is not a number).\n\n```html\n\u003cspan class=\"foo\"\n      animate-model-change\n      model=\"{{model}}\"\n      increment-class=\"up\"\n      decrement-class=\"down\"\n      non-number-class=\"unknown\"\n      timeout=\"500\"\u003e\n  ...\n\u003c/span\u003e\n```\n\n...and the CSS:\n```css\n.foo{\n  transition: 0.5s color ease;\n  color: black;\n}\n\n.up{\n  color: green;\n}\n\n.down{\n  color: red;\n}\n\n.unknown{\n  color: gray;\n}\n```\n\n## About ngmilk\n\u003cimg src=\"http://ngmilk.rocks/content/images/2014/10/111-1.jpg\" width=\"200px\"/\u003e\n\n**ngmilk** is the place to go for fresh front-end articles, with a focus on AngularJS.\nSee more on [ngmilk.rocks](https://ngmilk.rocks)\n\nFollow [@ngmilkrocks](http://twitter.com/ngmilkrocks) on Twitter to stay ahead of the game.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-milk%2Fangular-animate-model-change","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fng-milk%2Fangular-animate-model-change","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-milk%2Fangular-animate-model-change/lists"}