There is no way to detect when a user selects files from an Input Type File form element in Angular JS. So we will have to do it the old fashion way.

Rather than binding, we can directly make use of the input element’s onchange event.

And in our Javascript file where your controller is located, add this function:

That’s it!

So when I tried to open a file input dialog, I got this error Error: [$rootScope:inprog]. This happens because there can be only one $digest or $apply operation in progress.

To avoid this problem, you can do two things:

1) The Angular JS way by adding a timeout. Make sure to include $timeout and inject it in your controller.

Sample code:

2) The old fashion way by adding onclick=”document.getElementById(‘id’).click()” to the input file element.

This is a sponsored post written by me on behalf of LuxBox Case for SponsoredTweets. All opinions are 100% mine.

What is it with cases and iPhones? Apple certainly did a good job in brainwashing consumers that their devices are more luxurious that one initially thinks. They did a marvelous job with their marketing, that I can tell you.

Despite the advancement of the iPhone and its known durability that its body casing protects the device from even strong impacts, consumers still want to use phone cases to protect the phone from scratches and such.

Even when many screens of devices nowadays are made of Gorilla Glass, people still have the need to put on a casing. Some think of it as an accessory to better style the iPhone device. While some just want another extra added layer of protection for the device

It is better to have your phone be protected than be sorry later on, right?
The LuxBox Case currently comes in four different designs including wool and walnut veneer options. With this casing, there will be no more choosing between protection and a personal style that is befitting for you.

Cropped_fdc70c9c-750e-4c0e-b259-992458f0b403
Cropped_4d611206-4614-40a6-94b4-15b9acbb51b9
Cropped_414ab4df-73d1-41e4-a6b3-b14fcb9ad644
Cropped_cbc80560-a551-41e4-8d77-71beb2397750

The LuxBox Case has the sleek, modern, minimal design aesthetic and tactile feel in which the iPhone was. It comes in four different design combinations:

  • LuxBox Chosen White – White Lacquer Body + 100% Dark Grey
  • LuxBox Classic White – Heathered Wool Covering White Lacquer Body + Real Wood Veener Covering
  • LuxBox Classic Silver – MacBook Silver Body + 100% Dark Grey Heathered Wool Covering
  • LuxBox Chosen Silver – Macbook Silver Body + Real Wood Veener Covering

The case is unimold, made for optimal strength while a beveled rim that sits out in front of the screen protects the front glass while staying out of the way. The wide camera opening prevents photo distortion.

Anybody who purchases a LuxBox Case enjoys a 365 day warranty replacement for any problems in the case. Get one at theĀ theWTFactory SHOP.

Visit Sponsors Site

Related Posts Plugin for WordPress, Blogger...