From 8f37925aef2d7e7fd2f3acb350756d929bda5c39 Mon Sep 17 00:00:00 2001 From: Per Ploug Krogslund Date: Fri, 9 Aug 2013 08:46:26 +0200 Subject: [PATCH] adds a pre tag to render the raw model to the editor, this can be toggled in main.ctrl --- .../src/views/common/main.controller.js | 8 ++++++-- .../src/views/directives/umb-editor.html | 12 ++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js index 08c86f1f84..3dab0da431 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js @@ -9,11 +9,15 @@ * */ function MainController($scope, $routeParams, $rootScope, $timeout, notificationsService, userService, navigationService, legacyJsLoader) { + //debugmode so I can easily turn on/off json output of property models: + //TODO: find a better way + $scope.$umbdebugmode = true; + //set default properties //the null is important because we do an explicit bool check on this in the view - $scope.authenticated = null; - + $scope.authenticated = null; + //subscribes to notifications in the notification service $scope.notifications = notificationsService.current; $scope.$watch('notificationsService.current', function (newVal, oldVal, scope) { diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/umb-editor.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-editor.html index 168bd5a69a..bbaf7c3da1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/directives/umb-editor.html +++ b/src/Umbraco.Web.UI.Client/src/views/directives/umb-editor.html @@ -1,3 +1,11 @@
- -
\ No newline at end of file + + +
+
+{{model | json}}
+
+
+ + +