1.0.1 • Published 9 years ago

angular-assert-q-constructor v1.0.1

Weekly downloads
2,553
License
MIT
Repository
github
Last release
9 years ago

angular-assert-q-constructor Build Status

Make sure $q is a constructor (1.3+). Throw if it isn't.

Installing

$ npm install angular-assert-q-constructor

Usage

angular
  .module('myApp', [])
  .run(function (assertQConstructor) {
    assertQConstructor()
  })

API

assertQConstructor(message) -> undefined

If $q is a function, this is a noop. Otherwise (i.e. Angular <1.3) it will throw the message.

message

Type: string
Default: '$q is not a function'