当我尝试使用路由移动到view1或view2时显示空白页 并显示错误
未捕获的错误:[$ injector:modulerr] http://errors.angularjs.org/1.7.2/ $ injector / modulerr?p0 = myapp&p1 = ReferenceE…%20ye%20(http%3A%2F%2Flocalhost%2Fapp_angularjs%2Fangular.min.js%3A21%3A45)(匿名 函数)@ angular.min.js:7(匿名函数)@ angular.min.js:43q @ angular.min.js:8g @ angular.min.js:42hb @ angular.min.js:46c @ angular.min.js:22Vc @ angular.min.js:22ye @ angular.min.js:21(匿名函数)@ angular.min.js:340b @ angular.min.js:38
HTML:
private void label2_Click(object sender, EventArgs e)
{
string DirName;
SqlCeConnection conn = new SqlCeConnection("Data Source=C:\\Users\\username\\Documents\\Visual Studio 2010\\Projects\\NStacks1\\NStacks1\\Database1.sdf");
String name;
try
{
conn.Open();
SqlCeCommand Command = new SqlCeCommand("SELECT * FROM NStacks1 WHERE ID = 1", conn);
DataTable Data = new DataTable();
SqlCeDataAdapter adapter = new SqlCeDataAdapter(Command);
SqlCeDataReader myReader;
try
{
myReader.SqlCeReader();
DirName = Data.ToString();
con.Close();
name = DirName;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
con.Close();
}
}
AngularJS代码:
<!DOCTYPE html>
<html ng-app="myapp" >
<head>
<title></title>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="angular-route.js"></script>
<base href="/">
</head>
<body>
<h1>hiiiiiiiiiiiiiiiiiiii</h1>
<div ng-view=""></div>
</body>