Tag : AngularJS


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 | | 421 Viewer | Category : Bootstrap jQuery 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 | | 494 Viewer | Category : Bootstrap jQuery 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 | | 756 Viewer | Category : Bootstrap jQuery 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 | | 635 Viewer | Category : Bootstrap jQuery 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 | | 623 Viewer | Category : Javascript HTML jQuery 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 | | 687 Viewer | Category : Javascript jQuery 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 | | 728 Viewer | Category : Javascript jQuery 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 | | 571 Viewer | Category : AngularJS
READ MORE

AngularJS - simple image upload with preview example in PHP

Sometimes, we require to make image uploading with preview selected image before upload using AngularJS. So, This post will help you how to image or file upload in AngularJS and PHP. In this example i didn't user any plugin or directive for image upload. It is very simple so you can use very simple and anywhere. For front-end code write in AngularJS and back-end code write in PHP(for image upload code). It will also display preview of image before upload. Example is working on bellow listed three things, you can see. <strong>1)index.php</strong> <strong>2)upload.php</strong> <strong>3)images.....

By Hardik Savani | September 16, 2016 | | 2945 Viewer | Category : PHP Javascript jQuery AngularJS
READ MORE

How to hide div after some time using AngularJS?

Sometimes we require to do like hide div or text or any tag after some time using AngularJS. In this example i am going to show you how to do it. AngularJS have $timeout variable, $timeout variable through we can set specific time after hide. We can easily set time for hide or show. In this simple example you can see how it is works. Bellow example you can see and run bellow file in your machine. <strong>Example:</strong> <pre class="prettyprint lang-html"> <!DOCTYPE html> <html> <head> <title>Angularjs ng-hide div after few seconds</title> <script src = ".....

By Hardik Savani | September 9, 2016 | | 492 Viewer | Category : AngularJS
READ MORE

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Solved - Access Not Configured. Google+ API (truncated...) on google console developer

    Open Post

    Laravel 5.3 Image Upload with Validation example

    Laravel 5.3 Image Upload with Validation example

    Open Post

    How to implement infinite ajax scroll pagination in Laravel 5?

    How to implement infinite ajax scroll pagination in Laravel 5?

    Open Post

    How to send mail using mailable in laravel 5.3?

    How to send mail using mailable in laravel 5.3?

    Open Post

    CRUD (Create Read Update Delete) Example in Laravel 5.2 from Scratch

    CRUD (Create Read Update Delete) Example in Laravel 5.2 from Scratch

    Open Post

    How to use login throttle in laravel 5?

    How to use login throttle in laravel 5?

    Open Post