angularjs - angular.isObject() method not working -
angular provided angular.isobject
method not working on angular template file. have used function in template can see below :
<div class="row no-padding" ng-if="angular.isstring(student)"> {{student}} </div>
please in advance.
i have made simple solution need.
function myctrl($scope) { $scope.student = "dharmendra"; $scope.isthisanobject = function(input) { return angular.isstring(input); }; }
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.min.js"></script> <div ng-app ng-controller="myctrl"> <div class="row no-padding" ng-if="isthisanobject(student)"> {{student}} </div> </div>
Comments
Post a Comment