From 27891e304d07b3e0f97ac93fd3503e618a9b4a73 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 13 Jun 2018 10:16:25 +0200 Subject: [PATCH] fix icon contet flashes + update to new component syntax --- .../components/buttons/umbbutton.directive.js | 134 +++++++++--------- .../views/components/buttons/umb-button.html | 57 ++++---- 2 files changed, 97 insertions(+), 94 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js index 642ba3b529..047d67ffef 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js @@ -67,103 +67,107 @@ Use this directive to render an umbraco button. The directive can be used to gen @param {boolean=} disabled Set to true to disable the button. **/ -(function() { - 'use strict'; +(function () { + 'use strict'; - function ButtonDirective($timeout) { + angular + .module('umbraco.directives') + .component('umbButton', { + transclude: true, + templateUrl: 'views/components/buttons/umb-button.html', + controller: UmbButtonController, + controllerAs: 'vm', + bindings: { + action: "&?", + href: "@?", + type: "@", + buttonStyle: "@?", + state: " +
-
+
+
+
+
+
+
-
+ + + + {{vm.label}} + {{vm.label}} + + -
+ -
- - - - - {{label}} - {{label}} - - - - - - +