Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Trying to get my plugin working in Umbraco 8.1
Cant edit the fields in the back office. Get an error in the concole "TypeError: Cannot create property 'HeadingText' on string ''
What are the changes between 7 and 8 as the following cod works in 7
.js
angular.module('umbraco').controller('IBD_HeaderController', function ($scope) {
$scope.model.value.Tag = $scope.model.value.Tag || "default value"; $scope.model.value.HeadingText = $scope.model.value.HeadingText || "default value"; console.log($scope.model); $scope.SetTag = function () { $scope.model.value.Tag = $scope.value.Tag };
});
.html
<div class="IBD_CMS" ng-controller="IBD_HeaderController"> <div> <input class="headingTextBox" type="text" ng-model="model.value.HeadingText" ng-change="SetHeading()"> </div> <div class="HeadingTag"> <label class="TagOption"> <input type="radio" name="HeadingTag" value="h1" ng-model="model.value.Tag" ng-click="SetTag()"> <span>H1</span> </label> <label class="TagOption"> <input type="radio" name="HeadingTag" value="h2" ng-model="model.value.Tag" ng-click="SetTag()"> <span>H2</span> </label> <label class="TagOption"> <input type="radio" name="HeadingTag" value="h3" ng-model="model.value.Tag" ng-click="SetTag()"> <span>H3</span> </label> <label class="TagOption"> <input type="radio" name="HeadingTag" value="h4" ng-model="model.value.Tag" ng-click="SetTag()"> <span>H4</span> </label> <label class="TagOption"> <input type="radio" name="HeadingTag" value="h5" ng-model="model.value.Tag" ng-click="SetTag()"> <span>H5</span> </label> <label class="TagOption"> <input type="radio" name="HeadingTag" value="h6" ng-model="model.value.Tag" ng-click="SetTag()"> <span>H6</span> </label> </div> </div>
.
Figured it out need to change line
$scope.model.value.Tag = $scope.model.value.Tag || "default value"; $scope.model.value.HeadingText = $scope.model.value.HeadingText || "default value";
to
$scope.model.value.Tag = { $scope.model.value.Tag || "default value"}; $scope.model.value.HeadingText = { $scope.model.value.HeadingText || "default value"};
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
App_Plugin unable to set fields in back office.
Trying to get my plugin working in Umbraco 8.1
Cant edit the fields in the back office. Get an error in the concole "TypeError: Cannot create property 'HeadingText' on string ''
What are the changes between 7 and 8 as the following cod works in 7
.js
angular.module('umbraco').controller('IBD_HeaderController', function ($scope) {
});
.html
.
Figured it out need to change line
to
is working on a reply...