Which is equivalent to angular.isFunction in angular 2

In angular 1.x, we use this angular.isFunction function to determine if a link is a function. Which is equivalent to this function in angular 2. Checked in doc . But nothing happened.

Also suggest equivalent functions to this list in angular 2

+7
javascript angularjs angular typescript
source share
1 answer

You can use the JS typeof operator:

 typeof x === 'function' 
+12
source share

All Articles