From fff9d5ae1137d272fd076f169d529144d5cfba2e Mon Sep 17 00:00:00 2001 From: "Donigiewicz, Mariusz" Date: Thu, 11 Sep 2014 16:03:25 +0200 Subject: [PATCH] Api designer caches the reuqest #224 adding sugar query param --- app/scripts/controllers/raml-editor-main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/scripts/controllers/raml-editor-main.js b/app/scripts/controllers/raml-editor-main.js index 4bccd7f57..236db0941 100644 --- a/app/scripts/controllers/raml-editor-main.js +++ b/app/scripts/controllers/raml-editor-main.js @@ -11,8 +11,15 @@ angular.module('ramlEditorApp') ); } + function addSugarParam() { + var currentdate = $.now(); + return (currentdate - (currentdate % (1000 * 10))); + } + + + function readExtFile(path) { - return $http.get(path).then( + return $http.get(path.concat("?",addSugarParam())).then( // success function success(response) { return response.data;