Created
November 14, 2017 14:33
-
-
Save perploug/603b3137d181938a46be0c01958108e1 to your computer and use it in GitHub Desktop.
exercise 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("umbraco") | |
.controller("My.Workshop.EditController", function ($routeParams) { | |
var vm = this; | |
vm.workshop = {}; | |
vm.buttonState = "init"; | |
vm.properties = { | |
description: { label: "Description", description: "Workshop description" } | |
}; | |
vm.save = function () { | |
vm.buttonState = "success"; | |
}; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form novalidate name="contentForm" | |
ng-controller="My.Workshop.EditController as vm" | |
ng-submit="vm.save()"> | |
<umb-editor-view> | |
<umb-editor-header name="'hello'" | |
hide-alias="true" | |
hide-description="true" | |
hide-icon="true"> | |
</umb-editor-header> | |
<umb-editor-container class="form-horizontal"> | |
<umb-property property="vm.properties.description"> | |
</umb-property> | |
</umb-editor-container> | |
<umb-editor-footer> | |
<umb-editor-footer-content-right> | |
<umb-button action="vm.save()" | |
type="button" | |
button-style="success" | |
state="vm.buttonState" | |
shortcut="ctrl+s" | |
label="Save workshop" | |
disabled="vm.buttonState === 'busy'"> | |
</umb-button> | |
</umb-editor-footer-content-right> | |
</umb-editor-footer> | |
</umb-editor-view> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment