New! Check out Ionic Native. It's like ngCordova but for ES6 and TypeScript.

$cordovaFlashlight

Flashlight Cordova plugin.

cordova plugin add https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git
module.controller('MyCtrl', function($scope, $cordovaFlashlight) {

  $cordovaFlashlight.available().then(function(availability) {
    var avail = availability; // is available
  }, function () {
    // unavailable
  });

  $cordovaFlashlight.switchOn()
    .then(
      function (success) { /* success */ },
      function (error) { /* error */ });

  $cordovaFlashlight.switchOff()
    .then(
      function (success) { /* success */ },
      function (error) { /* error */ });

  $cordovaFlashlight.toggle()
    .then(function (success) { /* success */ },
      function (error) { /* error */ });
});