这是我的HTML和JS文件
HTML文件
<!DOCTYPE html>
<html ng-app="">
<head>
<!--Works with latest Stable Build-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"></script>
<!--Does not work with Latest Beta-->
<!--UNCOMMENT ME! <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.18/angular.min.js"></script>-->
<script src="script.js"></script>
</head>
<body ng-controller="MainController">
<h1>Angular Playground</h1>
{{message}}
<br />Total Length: {{message.length}}
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
JAVASCRIPT文件
var MainController = function($scope) {
$scope.message = "Hello, Michael";
};
Run Code Online (Sandbox Code Playgroud)
如果我使用最新的稳定版本,那么我得到以下结果(这显然是正确的):
角度游乐场
你好,迈克尔总长:14
但是,如果我使用Beta 18,那么我会收到以下错误:
错误:[ng:areq]参数'MainController'不是函数,未定义
并返回以下页面:
Angular Playground#2
{{message}}总时长:{{message.length}}
有什么想法,可能是什么造成的?
基本上,我想使用iTextSharp将字符串和条形码组合到一个单元格中.从下面的代码可以看出以下两行:
table.AddCell(tempstring);
table.AddCell(new text.Phrase(new text.Chunk(image39, 0, 0)));
Run Code Online (Sandbox Code Playgroud)
下面列出完整的代码
using text = iTextSharp.text;
using pdf = iTextSharp.text.pdf;
text.Document doc = new text.Document();
pdf.PdfWriter writer = pdf.PdfWriter.GetInstance(doc, new FileStream(pdfgen.sWorkPath + "\\OrderNumber" + txtSellerNumber.Text.ToString() + ".pdf", FileMode.Create));
doc.Open();
pdf.PdfContentByte cb = writer.DirectContent;
pdf.Barcode39 code39 = new pdf.Barcode39();
code39.Code = txtSellerNumber.Text.ToString();
code39.StartStopText = false;
text.Image image39 = code39.CreateImageWithBarcode(cb, null, null);
iTextSharp.text.Table table = new iTextSharp.text.Table(3);
table.BorderWidth = 2;
table.BorderColor = new text.Color(0, 0, 255);
table.Padding = 3;
table.Spacing = 1;
text.Cell cell = new …Run Code Online (Sandbox Code Playgroud)