Tag : filter


AngularJS - sorting(using orderby filter) table data example with demo

Data sort in one of the most important and essential component in any web based projects. we can find data in order by any field then we can find any data easily from reach data. In this post, we can learn how to sort table row using AngularJS orderby filter. in bellow example you can see we have two column one for language and another for total developer. So if you click on table heading then you can sort data using orderBy filert. You can learn and see bellow example. <strong>Example</strong> <pre class="prettyprint lang-html"> <html lang="en-US"> <link rel="stylesheet" href="htt.....

By Hardik Savani | June 27, 2016 | | 4303 Viewer | Category : AngularJS
READ MORE

How to change date format using date filter in AngularJS?

AngularJS provides several filter for developing. AngularJS date filter through you can change date format as you want like yyyy-mm-dd, dd-MM-yyyy, MM-dd-yyyy etc. In bellow example you could understand very well date helper to how to use date filter in Angular JS. In this example i have one array with date(yyyy-mm-dd date format) and date format will be convert into dd-mm-yyyy using date filter. <strong>Example</strong> <pre class="prettyprint lang-html"> <html lang="en-US"> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <bod.....

By Hardik Savani | June 26, 2016 | | 3697 Viewer | Category : AngularJS
READ MORE

How to create and use Middleware in Laravel 5?

Laravel is the best framework in PHP todays. Laravel framework provide saveral functionality and you can also find from this site. But now in this post you can learn how to create custom middleware as filter in laravel 5 example and how to use middleware in laravel 5. In this example you can learn how to add middlware from scratch in your laravel application. In this example i added middleware for check if user is admin then it can open someroute like ACL. So i added <strong class="path">id_admin</strong> column in my users table if use have is_admin = 1 then it can access "admins" route. So .....

By Hardik Savani | April 24, 2016 | | 23659 Viewer | Category : Laravel
READ MORE

AngularJS - How to Limit String Length using Filter?

Some case we have enough space to display content, for example you have articale blog and you want to display saveral articale on homepage with limited content like this way : <pre> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate.... </pre> You can do it easily if you are work on any framework or something, but if you want to do on angular then you need to cr.....

By Hardik Savani | April 14, 2016 | | 5386 Viewer | Category : Javascript jQuery AngularJS
READ MORE

AngularJS - How to Capitalize the first letter of word Using filter?

Sometimes, we want to make Capitalize string in our AngularJS project then we have to create filter because AngularJS not provide any predefined function that can Capitalize word or string. However, you can solve this problem by makeing your own filter that can help you to make Capitalize string or word. so let's see following example and use it. <strong class="example">Create Filter:</strong> <pre class="prettyprint lang-js"> var app = angular.module('myApp', []); app.filter('capitalizeWord', function() { return function(text) { return (!!text) ? text.charAt(0).toUpperCase() + .....

By Hardik Savani | April 13, 2016 | | 10657 Viewer | Category : jQuery AngularJS
READ MORE

AngularJS - how to remove html tags using filter?

Whenever you require to strip HTML tags usign Angular Filter, then this post can help you. If you are working on php then it is very easily use predefine function But in AngularJS you need to make your own filter for remove html tag from string. So, In bellow example you can see how to create and use it. <strong class="example">Create Filter:</strong> <pre class="prettyprint lang-js"> var app = angular.module('myHDApp', []); app.filter('removeHTMLTags', function() { return function(text) { return text ? String(text).replace(/<[^>]+>/gm, '') : ''; }; }); </pre> <strong class="example">U.....

By Hardik Savani | April 12, 2016 | | 21801 Viewer | Category : jQuery AngularJS
READ MORE

How to remove undefined value from jquery array?

If you have jquery or javascript array with lots of undefined value and you want to remove all undefined value from array. you can remove undefined items from your array without using each loop you have to just use filter, I would like give the example how to remove undefined element from javascript array. so, let's see bellow example. <strong class="example"></strong> <pre class="prettyprint lang-javascript lang-html"> <script type="text/javascript"> var obj = ['3','3','5',undefined,'hi']; obj = obj.filter(function(e){return e}); console.log(obj); </script> </pre>

By Hardik Savani | March 12, 2016 | | 1630 Viewer | Category : Javascript jQuery
READ MORE

    Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 2

    Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 2

    Open Post

    Twitter Bootstrap - Digital Clock picker with AM PM example using clockface plugin

    Twitter Bootstrap - Digital Clock picker with AM PM example using clockface plugin

    Open Post

    Laravel 5.2 - User ACL Roles and Permissions with Middleware using entrust from Scratch Tutorial

    Laravel 5.2 - User ACL Roles and Permissions with Middleware using entrust from Scratch Tutorial

    Open Post

    PHP - autocomplete websites with domain and logo using clearbit API

    PHP - autocomplete websites with domain and logo using clearbit API

    Open Post

    How to upload image with validation in PHP Codeigniter?

    How to upload image with validation in PHP Codeigniter?

    Open Post

    Laravel guzzle http client POST request example

    Laravel guzzle http client POST request example

    Open Post