I have Blockly blocks with text input
In my starter block, I want to set the text input to an angular variable.
But right now, it says my variable is {{var}}
and it evaluates to output
.
What currently happens is, the block initially shows output
but if I evaluate it to code or click on the text input, it reverts to show {{var}}
in the text input.
Could someone explain why that happens? Here is the relevant code; the starter blocks:
<xml id="startBlocks" style="display: none" >
<block type="given" inline="false" x="20" y="20"><field name="LINE"> {{pageInfo.exercise.title}}</field></block>
</xml>
I receive pageInfo from a GET:
$http.get('/api/exercise')
.success(function(data) {
$scope.pageInfo = data;
})
.error(function(data) {
console.log('Error: ' + data);
});