{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/10925","labels_url":"https://api.github.com/repos/angular/angular.js/issues/10925/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/10925/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/10925/events","html_url":"https://github.com/angular/angular.js/issues/10925","id":56153829,"number":10925,"title":"Add repeat-range directive","user":{"login":"Serabass","id":2150362,"avatar_url":"https://avatars.githubusercontent.com/u/2150362?v=3","gravatar_id":"","url":"https://api.github.com/users/Serabass","html_url":"https://github.com/Serabass","followers_url":"https://api.github.com/users/Serabass/followers","following_url":"https://api.github.com/users/Serabass/following{/other_user}","gists_url":"https://api.github.com/users/Serabass/gists{/gist_id}","starred_url":"https://api.github.com/users/Serabass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Serabass/subscriptions","organizations_url":"https://api.github.com/users/Serabass/orgs","repos_url":"https://api.github.com/users/Serabass/repos","events_url":"https://api.github.com/users/Serabass/events{/privacy}","received_events_url":"https://api.github.com/users/Serabass/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20ngRepeat","name":"component: ngRepeat","color":"fef2c0"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20feature","name":"type: feature","color":"00a606"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/38","html_url":"https://github.com/angular/angular.js/milestones/Ice%20Box","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/38/labels","id":529901,"number":38,"title":"Ice Box","description":"Milestone for valid issues and bugs that we have no aspirations on fixing any time soon because they are not affecting primary use-cases and are not aligned with our goals.","creator":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars.githubusercontent.com/u/216296?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":121,"closed_issues":80,"state":"open","created_at":"2014-01-08T08:19:21Z","updated_at":"2015-03-17T19:28:46Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-02-01T06:22:02Z","updated_at":"2015-03-18T09:38:01Z","closed_at":null,"body":"Programmers want this directive!\r\nGoogle has many examples with ng-range, ng-repeat-range, but a lot of them working through compiling to e.g ng-repeat=\"n in [1,2,3,4,5,6]\". This may create a large arrays in memory.\r\n\r\nI want to see the ng-range directive as:\r\n`<div ng-range=\"5\"> {{ n }} </div>` - renders my element 5 times (n is a default alias)\r\n`<div ng-range=\"5 as x\"> {{ x }} </div>`  - x is an new alias\r\n`<div ng-range=\"1 to 10\"> {{ n }} </div>`\r\n`<div ng-range=\"1 to 10 as x\"> {{ x }} </div>`\r\n`<div ng-range=\"10 step 2\"> {{ n }} </div>`\r\n`<div ng-range=\"10 step 2 as x\"> {{ x }} </div>`\r\n`<div ng-range=\"1 to 10 step 2\"> {{ n }} </div>`\r\n`<div ng-range=\"1 to 10 step 2 as x\"> {{ x }} </div>`\r\n\r\nI wrote the RegExp for parse this string. \r\n`/^(.+?)(?:\\s*to\\s*(.+?))?(?:\\s*step\\s*(.+?))?(?:\\s*as\\s*(\\w+))?$/`.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/82852703","html_url":"https://github.com/angular/angular.js/issues/10925#issuecomment-82852703","issue_url":"https://api.github.com/repos/angular/angular.js/issues/10925","id":82852703,"user":{"login":"syndicatedshannon","id":905156,"avatar_url":"https://avatars.githubusercontent.com/u/905156?v=3","gravatar_id":"","url":"https://api.github.com/users/syndicatedshannon","html_url":"https://github.com/syndicatedshannon","followers_url":"https://api.github.com/users/syndicatedshannon/followers","following_url":"https://api.github.com/users/syndicatedshannon/following{/other_user}","gists_url":"https://api.github.com/users/syndicatedshannon/gists{/gist_id}","starred_url":"https://api.github.com/users/syndicatedshannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syndicatedshannon/subscriptions","organizations_url":"https://api.github.com/users/syndicatedshannon/orgs","repos_url":"https://api.github.com/users/syndicatedshannon/repos","events_url":"https://api.github.com/users/syndicatedshannon/events{/privacy}","received_events_url":"https://api.github.com/users/syndicatedshannon/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T09:38:01Z","updated_at":"2015-03-18T09:38:01Z","body":"I'd like to comment that it's not just a single in-memory array that is the cost. Because the examples the OP was referring to compile to ng-repeat, the array actually appears many times in the DOM growing literally exponentially.\r\n\r\nI agree that a filter avoids this issue, however it adds the complexity of managing index uniqueness."}}