i'm trying to break multiple strings on the \n entry inside a string. currently the code is as followed:
<p ng-if="controller.service.variable" class="card-text" ng-repeat="factor in controller.service.variable.replace('\n\n','\n').split('\n')">{{factor}}</p>
This works just fine when there are two \n\n inside the string, when theres more then two, the split breaks and no longer shows anything.
the \n\n replace was supposed to fix this in a earlier bug, where two \n\n would break the string aswell. any ideas?
Current test data being split:
gjdfbjgd\n\njffsjfsbf\n\nsfj \n\nfsbfsssfsfsf
.split(/\n*/), also no need ofreplace.split(/\n+/)