angular-assert-q-constructor
v1.0.1
Published
Make sure $q is a constructor (1.3+). Throw if it isn't.
Downloads
2,626
Maintainers
Readme
angular-assert-q-constructor
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'