我有三個scope
變量:傳遞範圍變量值對象
我想給scope
值傳遞給下面的對象,但它的失敗,丟了我的錯誤...
$scope.content.new_line = "'\n'";
$scope.content.text1 = "Text.\n\n";
$scope.content.text2 = "Text.\n\n";
var content = {
pageSize: $scope.pageSize,
content: [
{
text: "some text",
style: ['header', 'aligncenter']
},
$scope.content.new_line,
$scope.content.text1,
$scope.content.text2, {
style: 'center'
},
'\n',
'Text.\n\n', {
text: 'Again some text',
style: ['quote', 'small']
}
]
};
任何人都可以讓我知道如何正確地將scope
值傳遞給此object
。
我使用pdfmake
庫... https://github.com/bpampuch/pdfmake
這是一個正常的內容:
var docDefinition = {
content: [
'paragraph 1',
'paragraph 2',
{
columns: [
'first column is a simple text',
[
// second column consists of paragraphs
'paragraph A',
'paragraph B',
'these paragraphs will be rendered one below another inside the column'
]
]
}
]
};
小心分享你遇到的錯誤? –
a [mcve]會很棒 –
@ DanielA.White:我更新了帖子.... – Shane