Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 咕噜声显示不完整的页面_Javascript_Angularjs_Yo - Fatal编程技术网

Javascript 咕噜声显示不完整的页面

Javascript 咕噜声显示不完整的页面,javascript,angularjs,yo,Javascript,Angularjs,Yo,我刚刚安装了yo,并使用生成器创建了一个应用程序。下载完成后,我运行了grunt-service。它向我展示了一个不完整的页面。我检查了浏览器控制台,它显示: SyntaxError: unterminated string literal angular.js:28826:87 TypeError: angular is undefined angular-animate.js:9:4 TypeError: angular is undefined angular-cookies.js:24:

我刚刚安装了
yo
,并使用
生成器创建了一个应用程序。下载完成后,我运行了
grunt-service
。它向我展示了一个不完整的页面。我检查了浏览器控制台,它显示:

SyntaxError: unterminated string literal angular.js:28826:87
TypeError: angular is undefined angular-animate.js:9:4
TypeError: angular is undefined angular-cookies.js:24:0
TypeError: angular is undefined angular-resource.js:8:4
TypeError: angular is undefined angular-route.js:24:4
TypeError: angular is undefined angular-sanitize.js:19:4
ReferenceError: angular is not defined app.js:11:0
ReferenceError: angular is not defined main.js:10:0
ReferenceError: angular is not defined about.js:10:0
The connection to ws://localhost:35729/livereload was interrupted while the page was loading. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
The connection to ws://localhost:35729/livereload was interrupted while the page was loading. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Running "serve" task

Running "clean:server" (clean) task
>> 1 path cleaned.

Running "wiredep:app" (wiredep) task

Running "wiredep:test" (wiredep) task

Running "concurrent:server" (concurrent) task

Running "copy:styles" (copy) task
Copied 1 file

Done, without errors.


Execution Time (2015-09-19 06:20:08 UTC)
loading tasks               14ms  ████████ 22%
loading grunt-contrib-copy  30ms  ████████████████ 46%
copy:styles                 21ms  ███████████ 32%
Total 65ms

Running "autoprefixer:server" (autoprefixer) task
Autoprefixer's process() method is deprecated and will removed in next major release. Use postcss([autoprefixer]).process() instead
File .tmp/styles/main.css created.

Running "connect:livereload" (connect) task
Started connect web server on http://localhost:9000

Running "watch" task
Waiting...
终端显示:

SyntaxError: unterminated string literal angular.js:28826:87
TypeError: angular is undefined angular-animate.js:9:4
TypeError: angular is undefined angular-cookies.js:24:0
TypeError: angular is undefined angular-resource.js:8:4
TypeError: angular is undefined angular-route.js:24:4
TypeError: angular is undefined angular-sanitize.js:19:4
ReferenceError: angular is not defined app.js:11:0
ReferenceError: angular is not defined main.js:10:0
ReferenceError: angular is not defined about.js:10:0
The connection to ws://localhost:35729/livereload was interrupted while the page was loading. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
The connection to ws://localhost:35729/livereload was interrupted while the page was loading. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
 Firefox can't establish a connection to the server at ws://localhost:35729/livereload. livereload.js:191:0
Running "serve" task

Running "clean:server" (clean) task
>> 1 path cleaned.

Running "wiredep:app" (wiredep) task

Running "wiredep:test" (wiredep) task

Running "concurrent:server" (concurrent) task

Running "copy:styles" (copy) task
Copied 1 file

Done, without errors.


Execution Time (2015-09-19 06:20:08 UTC)
loading tasks               14ms  ████████ 22%
loading grunt-contrib-copy  30ms  ████████████████ 46%
copy:styles                 21ms  ███████████ 32%
Total 65ms

Running "autoprefixer:server" (autoprefixer) task
Autoprefixer's process() method is deprecated and will removed in next major release. Use postcss([autoprefixer]).process() instead
File .tmp/styles/main.css created.

Running "connect:livereload" (connect) task
Started connect web server on http://localhost:9000

Running "watch" task
Waiting...
我不知道怎么了

这是页面的外观:

编辑:Grunt.js文件

//于2015-09-18使用发电机角度0.12.1生成
"严格使用",;
//#全球化
//出于性能原因,我们只降低了一个级别:
//'test/spec/{,*/}*.js'
//如果要递归匹配所有子文件夹,请使用此选项:
//“test/spec/***.js”
module.exports=函数(grunt){
//任务所需的时间。可以帮助优化构建时间
要求(“时间咕噜”)(咕噜);
//自动加载所需的Grunt任务
要求(“jit-grunt”)(grunt{
useminPrepare:'grunt usemin',
ngtemplates:“grunt角度模板”,
cdnify:“咕噜咕噜谷歌cdn”
});
//应用程序的可配置路径
var appConfig={
app:require('./bower.json').appPath | |“app”,
dist:“dist”
};
//定义所有任务的配置
grunt.initConfig({
//项目设置
约曼:appConfig,
//监视文件的更改,并基于更改的文件运行任务
观察:{
鲍尔:{
文件:['bower.json'],
任务:['wiredep']
},
js:{
文件:['/scripts/{,*/}*.js'],
任务:['newer:jshint:all'],
选项:{
livereload:'
}
},
jsTest:{
文件:['test/spec/{,*/}*.js'],
任务:['newer:jshint:test','karma']
},
风格:{
文件:['/styles/{,*/}*.css'],
任务:[“更新的:复制:样式”,“自动引用器”]
},
Grunfile:{
文件:['grunfile.js']
},
利弗雷罗德:{
选项:{
livereload:'
},
档案:[
'/{,*/}*.html',
“.tmp/styles/{,*/}*.css”,
“/images/{,*/}*{png,jpg,jpeg,gif,webp,svg}”
]
}
},
//实际的grunt服务器设置
连接:{
选项:{
港口:9000,
//将此更改为“0.0.0.0”以从外部访问服务器。
主机名:“localhost”,
利弗雷罗德:35729
},
利弗雷罗德:{
选项:{
开放:是的,
中间件:功能(连接){
返回[
connect.static('.tmp'),
连接()。使用(
“/bower_组件”,
连接.静态(“./bower_组件”)
),
连接()。使用(
“/app/styles”,
connect.static(“./app/styles”)
),
connect.static(appConfig.app)
];
}
}
},
测试:{
选项:{
港口:9001,
中间件:功能(连接){
返回[
connect.static('.tmp'),
connect.static('test'),
连接()。使用(
“/bower_组件”,
连接.静态(“./bower_组件”)
),
connect.static(appConfig.app)
];
}
}
},
地区:{
选项:{
开放:是的,
基:“”
}
}
},
/确保代码风格达到标准,没有明显的错误。
jshint:{
选项:{
jshintrc:“.jshintrc”,
记者:require('jshint-style')
},
全部:{
src:[
“Gruntfile.js”,
“/scripts/{,*/}*.js”
]
},
测试:{
选项:{
jshintrc:'test/.jshintrc'
},
src:['test/spec/{,*/}*.js']
}
},
//清空文件夹以重新开始
清洁:{
地区:{
档案:[{
多特:没错,
src:[
“.tmp”,
'/{,*/}*',
“!/.git{,*/}*”
]
}]
},
服务器:'.tmp'
},
//添加供应商前缀样式
自动刷新器:{
选项:{
浏览器:[“上一版本”]
},
服务器:{
选项:{
地图:没错,
},
档案:[{
是的,
cwd:“.tmp/styles/”,
src:'{,*/}*.css',,
目标:'.tmp/styles/'
}]
},
地区:{
档案:[{
是的,
cwd:“.tmp/styles/”,
src:'{,*/}*.css',,
目标:'.tmp/styles/'
}]
}
},
//自动将Bower组件注入应用程序
wiredep:{
应用程序:{
src:['/index.html'],
忽略路径:/\.\\//
},
测试:{
devDependencies:是的,
src:“”,
信号路径:/\.\.\/,,
文件类型:{
js:{
块:/([\s\t]*)\/{2}\s*?bower:\s*?(\s*)(\n{124;\ r}.)*?(\/{2}\s*endbower)/gi,
检测:{
js:/'(.\.js)'/gi
},
替换:{
js:'\'{{filePath}}\','
}
}
}
}
},
//重命名文件以用于浏览器缓存
文件版本:{
地区:{
src:[
“/scripts/{,*/}*.js”,
“/styles/{,*/}*.css”,
“/images/{,*/}*{png,jpg,jpeg,gif,webp,svg}”,
“/styles/fonts/*”
]
}
},
//读取usemin块的HTML以启用自动生成的智能构建
//压缩、缩小和修订文件。在内存中创建配置,以便
//其他任务可以对它们进行操作
使用准备:{
html:“/index.html”,
选项:{
目标:'',
流量:{
html:{
步骤:{
js:['concat','uglifyjs'],
css:['cssmin']
},
职位:{}
}
}
}
},
//基于filerev和useminPrepare配置执行重写