Kacey Ezerioha Kacey Ezerioha - 1 year ago 91
AngularJS Question

Boolean variable .toString() Function Displays [Object Object]

I have a C# bool method that is called and executed on the client through AngularJS. The method works without any error as I have confirmed but the string result (

) of the execution (true or false) displays
[Object Object]
instead. Below is the script function;

vm.isActiveCustomer = function(sp) {
var result = sessionService.isActiveCustomer({
id: sp.id
}).success(function() {
}).finally(function() {

It looks simple but I can't get it to display what I want. Please Help.

Answer Source

You are missing an argument to the success callback. result is a likely a promise and handling an async request. You'll have to keep the flow and keep it async.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download