angularjs - Angular group by and filter -


I am trying to group my collection on a property basis and at the same time, I want to filter with.

When I try the following, then filter the div data-ng-repeat = "(group, parameter) in the parameter

 : {'type': ' ! Group Type '} | GroupB:' Group '"& gt; & Lt; Fieldset & gt; & Lt; Story & gt; {{Group}} & lt; / Narrative & gt; & Lt; div data-ng-repeat = "equal to parameter" & gt; & Lt; myfield ng-model = "par.value" parameter = "equal" entry-map = "entry" & gt; & Lt; / Myfield & gt; & Lt; / Div & gt; & Lt; / Fieldset & gt; & Lt; / Div & gt;   

I get lots of errors on the console,

  error: [$ rootScope: infdig] 10 $ digest () iterations reached Stayed! Can be seen in the last 5 iterations:   

I have no eyes on my collection. What is the correct way to do this?

I will advise you against the use of the group's implementation '' $ filter , Use:

  angular. Module ("sbrpr.filters", []) .filter ('groupBy', function () {var result = {}; return function (data, key) {if (! (Data (& amp; key)) returns; Var result; if (! This. $ Id) {result = {};} else {var scopeId = this $ Id; if (! Result [scope id]) {result [scope id] = {}; it's $ ("$ Delete ", function () {Delete result [scopid];})}} result = result for [scope id];} (for var group); (result for group) [group's]. System (0, result [groupKey] for length); (var i = 0; i & lt; data.length; i ++) {if the result ([parity] G [i] [key]] results [data] [key]] = []; result [data] [key]]. (Data [i]);} var keys = Object.keys (result) ; (Var k = 0; k & lt; keys.length; k ++) {if (result [key [k]]. Length === 0 remove the result [key [k]];} return result ;};});   

Also, where you discuss that the implementation you are using is actually very bad.

And finally, thank you!

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -