Category : AngularJS


How to copy to clipboard without flash in AngularJS ?

In this post we are going learn how to copy to clipboard in AngularJS application using ngclipboard js plugin. I provide very simple example using CDN, so you can simply run and understand well. when require to give function of copy some text by clicking on button or any link. There are several library can do copy text using flash player, but in this example i will do it without using flash player. In this example we will use ngclipboard.js AngularJS Plugin for copy to clipboard. Now i am going to share with you full example of ngclipboard js plugin. I use cdn for jquery and ngclipboard js .....

By Hardik Savani | February 21, 2017 | | 5390 Viewer | Category : AngularJS
READ MORE

AngularJS - How to render HTML value in ng-repeat ?

I always post small example of AngularJS function, In this example we learn how to render our HTML code in ng-repeat using trustashtml filter. Sometimes we have array or object of records with html values, at that time we require to use ng-repeat, But we can't simple way render html code, we should require to use trustashtml or ng-bind-html-unsafe etc. So in this example i created one filter for this task using sce trustashtml. filter as like bellow you can see code of that filter using $sce.trustAsHtml. <strong>Filter</strong> <pre class="prettyprint lang-html"> app.filter('trustAsHtml',['$.....

By Hardik Savani | February 4, 2017 | | 3555 Viewer | Category : AngularJS
READ MORE

AngularJS - scroll to a specific element using anchorscroll

Sometimes, we require to scroll on specific element or div on angularjs application like scroll for go on specific comment, scroll on specific table row it. However we can do it using anchorscroll in angularjs application. anchorscroll() will help to scroll on specific "anchor" div id. anchorscroll() is provided by angularjs. We can use it simply. We don't require to write login on code jquery, because it is easy to do using anchorscroll(). $anchorScroll will use with $location variable hash. I gave you full example of how to scroll on specific element on angularjs page, We can use simple as.....

By Hardik Savani | December 15, 2016 | | 8171 Viewer | Category : AngularJS
READ MORE

AngularJS - convert comma separated string to array example

When i was working on my Laravel angularjs application, i require to make array from comma separated string, I was not expert in angularjs so i was thingking how is it possible ?, But Finally i was found solution using custom angularjs Filter. So, In this example, I will give you full example of how to convert comma separated string into array and how to print it. We will create array using split() of jquery. But if you know angularjs we can't do it anything directly from layout, So we should create our custom filter, as bellow you can see i created "customSplitString" filter. <strong>Filter:.....

By Hardik Savani | November 24, 2016 | | 18136 Viewer | Category : AngularJS
READ MORE

AngularJS - How to create read more/less toggle using Directive?

Sometimes, We may require to make to show read more and read less functionality in our AngularJS application. We can make read more using AngularJS Directive. So, In this example i going to give you full example of read more text example. I used "dd-text-collapse" Directive for after some text it will return "..." OR "(more)" etc that as you want. You can simply customize this Directive. You can also make toggle read more and read less using this Directive. First, you can see bellow code of just Directive, i give you bellow code of Directive, you can use direct in your AngularJS application......

By Hardik Savani | November 16, 2016 | | 11193 Viewer | Category : AngularJS
READ MORE

Angularjs nl2br(textarea newline and linebreak conversion) example with demo

Sometimes we require to display message conversion in your angularJS App, But if you are using textarea for write comment or something then text display on same like without line break. But we can display text with likebreak using nl2br(). we can use directly in nl2br() if we work on PHP But if we work on angulaJS then we can't use it directly Because it is not pre-define function. So, we require to make custom helper or something, So in this example i created custom angular filter for nl2br, that way we can use it globally in angularJS app. we will use nl2br filter add like as bellow : <pre.....

By Hardik Savani | November 8, 2016 | | 4870 Viewer | Category : AngularJS
READ MORE

AngularJS - Display Default image if original image does not exists with example

We always require to check image is exists or not in given path, If not exists then we have to set default image. If we work on PHP or any framework then we check condition or something else for image exists of not to check But If you are working on AngularJS framework then we can do it using "directive". AngularJS directive through we can simple check image is exists or not on the given url path. In this example i use ng-src and err-src attribute to manage image, directive will check ng-src url image is exists or not, if not then it will set err-src image as default. So, I give you very bas.....

By Hardik Savani | October 18, 2016 | | 4259 Viewer | Category : AngularJS
READ MORE

AngularJS - update bind ng-model input value from Jquery Code

Sometimes, we require to set value of input box from js code, But if you bind with ng-model of angular then you can't set value directly with "val()" of jquery. As Bellow example: <pre> $("#my-name").val('test'); </pre> But of you set this way then it will display in your text box layout, but you can't get from on submit function. So, you have to also trigger input that way AngularJS can get on controller method. You can see bellow full example that way you can understand how to solve this issue: <strong>Example:</strong> <pre class="prettyprint lang-html"> <!DOCTYPE html> <html>.....

By Hardik Savani | September 27, 2016 | | 9092 Viewer | Category : AngularJS
READ MORE

How to call AngularJS controller function in Jquery?

Today, i am going to show you how to call angular function in your js file. Sometimes we need to call angular controller function in our jquery code because we can make single function in all project. It is very simple post but it important because many times we require to call angularjs function from jquery. So, i given bellow example will help you how to call angularjs function in jquery. It is from scratch that way you can simply understand. In this example i created one function "$scope.makeAlert()" In my AngularJS controller. This function have one argument that way we can also pass a.....

By Hardik Savani | September 22, 2016 | | 11597 Viewer | Category : AngularJS
READ MORE

How to remove # from URL in AngularJS?

If you work on AngularJS web application using angular route then you notice one thing. If you click on any hyper links it makes like as bellow: <pre> http://localhost:8000/# http://localhost:8000/#/items http://localhost:8000/#/users </pre> I mean always "#" will be there, But when we live this web application then it should delete "#" from URL, because it makes issue when we share link on facebook or etc. But should look likes: <pre> http://localhost:8000/ http://localhost:8000/items http://localhost:8000/users </pre> But we can remove easily using "$locationProvider.html5Mode(true);". Yo.....

By Hardik Savani | September 18, 2016 | | 3320 Viewer | Category : AngularJS
READ MORE

    Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 1

    Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 1

    Open Post

    Jquery - Show hide password in Password textbox using checkbox.

    Jquery - Show hide password in Password textbox using checkbox.

    Open Post

    Laravel 5.3 - How to create SEO friendly sluggable URL

    Laravel 5.3 - How to create SEO friendly sluggable URL

    Open Post

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Open Post

    Laravel 5.3 - image dimension validation rules example

    Laravel 5.3 - image dimension validation rules example

    Open Post

    Simple Tags System Example in Laravel 5

    Simple Tags System Example in Laravel 5

    Open Post