📜  angular.toJson - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:57.048000             🧑  作者: Mango

代码示例1
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)