我在使用angularjs路由中,想要将在路由创建controller,然后为页面赋值,但是报错说 ReferenceError: $scoep is not defined,但我不知道哪里出问题了,还请帮我只小白分析分析。
我的代码如下:
userApp.config(function($routeProvider){
$routeProvider.when('/',{templateUrl:'views/userViews/homeUserView.html'})
.when('/app',{templateUrl:'views/userViews/application.html'})
.when('/work',{
templateUrl:'views/userViews/work.html',
controller:'jobCtrl'
controller:function($scope){
$scope.op_object = "作业";
$scoep.Lists = [
{
'id':'1',
'name':'作业1',
'info':'这是作业1的描述啦'
},
{
'id':'2',
'name':'作业2',
'info':'这是作业2的描述啦'
},
{
'id':'2',
'name':'作业2',
'info':'这是作业2的描述啦'
}
];
}
});
我在页面上想获取这里的op_object和Lists显示在页面上,代码如下:
Your Answer
1 answers
Hot tools Tags
Hot Questions
How to pass an array into a SQL Server stored procedure
2026-01-31 22:24:05
What to do with mysqli problems? Errors like mysqli_fetch_array(): Argument #1 must be of type mysqli_result and such
2026-01-31 22:02:53
Convert a JavaScript string in dot notation into an object reference
2026-01-31 21:22:07
MySQL error #2014 - Commands out of sync; you can't run this command now [closed]
2026-01-31 21:01:19
How do I format a date in JavaScript?
2026-01-31 20:43:18
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
Douyin level price list 1-75
20537
7
20537
7
wifi shows no ip assigned
13641
4
13641
4
Hot Article
How to save money when transferring funds across exchanges? OKX network withdrawal rate list
2026-04-10
By DDD
What should I do if I can't log in after changing my mobile phone? Binance security item reset detailed process
2026-04-09
By DDD
How does mysql use the lock function to implement application-level locking_mysql get_lock function practice
2026-04-08
By DDD
A Beginner's Guide to Python Data Analysis and Predictive Modeling
2026-04-09
By DDD






