Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular.toJson

Use this method, Input to be serialized into JSON.

    var temp;
    temp = angular.toJson(obj,pretty); 
    console.log(temp);
    
    //pretty(optional).If set to true, the JSON output will contain newlines and whitespace. 
    If set to an integer, the JSON output will contain that many spaces per indentation.
    (default: 2)
Source by docs.angularjs.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
6+4 =