angularjs-filter Questions

4

Solved

I'm new to AngularJS and trying to create a simple app that will allow me to upload files to my Laravel driven website. I want the form to show me the preview of what the uploaded item will look li...
Snorter asked 14/12, 2014 at 21:46

27

Solved

I have the following: <div>{{modal.title}}</div> Is there a way that I could limit the length of the string to say 20 characters? And an even better question would be is there a way...
Photogenic asked 7/8, 2013 at 6:0

9

Solved

I have a text input and I don't want to allow users to use spaces, and everything typed will be turned into lowercase. I know I'm not allowed to use filters on ng-model eg. ng-model='tags | lower...
Ornithomancy asked 19/1, 2013 at 22:38

6

Solved

I am using groupBy from angular-filter to group an array of objects by their date property. <div ng-repeat="(day, dayEvents) in events | groupBy: 'date' )"> <h3>{{ day | date: mediumD...
Lattimer asked 12/2, 2015 at 9:26

7

So I have an array that I'm using ng-repeat to render out but I want to reverse this list. Previously I have used a filter which i got from this answer: angular ng-repeat in reverse But now I get ...
Chamness asked 22/1, 2014 at 15:17

14

Solved

I've tried using the uppercase filter but it does not work. I've tried doing it two ways: <input type="text" ng-model="test" uppercase/> and <input type="text" ng-model="{{test | upper...
Hypochondriac asked 5/5, 2013 at 20:1

6

Solved

I need a filter to replace all the underscores to spaces in a string
Sagunto asked 11/8, 2015 at 10:27

9

Solved

<div class="recent" ng-repeat="reader in (filteredItems = (book.reader | orderBy: 'created_at' | limitTo: 1))"> </div> So the book comes from rest api and it has many readers attache...
Unesco asked 28/4, 2013 at 9:12

2

Solved

I want to split camel case string to regular form and want to use customize filter. <select class="form-control" ng-model="emailsettingType" ng-change="emailsettingTypeChange()" name="emailsett...
Pearson asked 20/2, 2018 at 15:25

3

I'm using ngx-filter-pipe with angular 4 and I'm stuck with this issue. I managed to filter with one value and now im trying to filter data with more than one value: Here's what I got This is my co...
Mayemayeda asked 18/9, 2017 at 23:12

10

Solved

I have an UTC date in milliseconds which I am passing to Angular's date filter for human formatting. {{someDate | date:'d MMMM yyyy'}} Awesome, except someDate is in UTC and the date filter cons...
Berrie asked 18/12, 2013 at 15:31

3

How do you check if a string has a translated value? I'm using AngularJS and AngularTranslate. I only want to display a value if it has a been translated. Angular Translate will show the untransl...
Lamellate asked 1/12, 2013 at 16:0

7

Solved

Live Demo Why this: # Controller $scope.price = -10; # View {{ price | currency }} results in ($10.00) rather than -$10.00?
Vassalage asked 3/7, 2013 at 6:37

12

Solved

Is there a way to remove the decimal/cents from the output of a currency filter? I'm doing something like this: <div>{{Price | currency}}</div> Which outputs: $1,000.00 Instead,...
Spiderwort asked 8/2, 2013 at 22:33

12

Solved

I have an array of products that I'm repeating over using ng-repeat and am using <div ng-repeat="product in products | filter:by_colour"> to filter these products by colour. The filter i...
Arsenical asked 6/2, 2013 at 15:52

7

Solved

Is it possible to filter an array of objects, such that the value of property can be either of a few values (OR condition) without writing a custom filter This is similar to this problem - Angular...
Sensitometer asked 24/2, 2014 at 12:33

4

Solved

I have a 10(or n)checkbox in my ng-view. Now I would like to ask here that What is the most efficient or simple way to check if checkbox is checked and if checked get the value of checkbox. &...

3

Solved

app.controller('myController', ['$scope', '$http', '$filter', function($scope, $http, $filter) { The above is an example of my code where I am trying to use $http.get and also $filter inside my c...

3

Solved

I have a simple UI grid with these options: $scope.transactionGrid = { enableSorting : true, enableColumnResize : true, enableScrollbars : true, enablePaginationControls : false, minRowsToSho...

4

Is there any option to filter from $scope.items where the ID exist in the array $scope.myitems ? ng-repeat="item in items | filter:{item.id == myitems} Demo: http://codepen.io/anon/pen/rOeGYB ...
Christen asked 17/9, 2015 at 18:59

5

Solved

How do you unit test a filter in Angular?
Deflective asked 13/1, 2014 at 15:8

3

Solved

In this example, I use filter in the ng-repeat, but how do I use it in a variable and ng-if, something like: {{languages.length | filter: {available: true}}} and ng-if="languages.length == 0 | ...
Corroboration asked 16/7, 2015 at 13:27

5

Solved

I am trying to filter on a boolean value in an ng-repeat. List of unregistered users: <h3>Unregistered Users</h3> <div ng-repeat="user in users | filter:!user.registered"> &l...
Sauceda asked 15/7, 2013 at 13:48

3

I am attempting to invoke a custom filter from an Angular controller but I get the error: 'Cannot invoke an expression whose type lacks a call signature'. I implemented it like this on the last pr...
Rerun asked 10/10, 2015 at 21:49

6

Solved

I have a simple <input> search filter set up for a list of itemnames in AngularJS. My list looks like this: var uniqueLists = { category1: ['item1', 'item2', 'item3' ... 'item180' ], // Re...
Canned asked 31/7, 2013 at 11:34

© 2022 - 2024 — McMap. All rights reserved.