我使用angular-cli创建了一个新的角度app.
我完成了应用程序并使用ng-serve进行预览,它运行良好.
之后我使用了ng build --prod,它生成了'dist'文件夹.当我将该文件夹放在xampp中运行时,它无法正常工作.我发现没有*.js文件,应该在*.ts - >*.js转换之后(我想).
我已附上截图,其中左侧显示的是包含所有.ts文件的src文件夹,中间显示'dist'文件夹和浏览器屏幕截图.
请指导我如何从angular-cli生成完全正常工作的应用程序,我可以在我的xampp服务器上运行.
截图:

我目前正在开发Ionic2应用程序.我遇到一个问题,在Splash屏幕之后,在app主屏幕之前有6-7秒的白屏.
我尝试了一些谷歌搜索,但没有任何作用.我最后一次尝试解决的问题是
hideSplashScreen() {
if(Splashscreen){
setTimeout(() => {
Splashscreen.hide();
},100)
}
};//
<preference name="SplashMaintainAspectRatio" value="true"/>
<preference name="FadeSplashScreenDuration" value="300"/>
Run Code Online (Sandbox Code Playgroud)
请帮我解决这个问题;
编辑::我ionic info的
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.47
ios-deploy version: 1.8.6
OS: OS X El Capitan
Node Version: v6.3.1
Xcode version: Xcode 7.2 Build version 7C68
Run Code Online (Sandbox Code Playgroud) 我正在使用代码覆盖选项在 Starter Angular 10 项目中运行 ng 测试。Coverage 文件夹正在正确生成,但我找不到 lcov.info。我需要 SonarQube 这个文件。
我在HTML模板中有一个元素.我给它添加了一个指令:
<div myCustomDirective>HELLO</div>
Run Code Online (Sandbox Code Playgroud)
我希望每当我将鼠标悬停在div文本里面时都div应该更改,但是需要从Directive (mouseover)事件中完成.
我不知道如何从a发出事件Directive并捕获父元素内部.
任何帮助表示赞赏.这是angular2项目.
我想在Ionic2中的radio-group中的(ionChange)事件中获取所选的单选按钮值.
我的Html代码是
<ion-list radio-group *ngFor="let question of mcqData; let i= index;" (ionChange)="mcqAnswer(i)">
<ion-list-header>
{{question.questionText}}
</ion-list-header>
<ion-item>
<ion-label>{{question.optionA}}</ion-label>
<ion-radio value="1"></ion-radio>
</ion-item>
<ion-item>
<ion-label>{{question.optionB}}</ion-label>
<ion-radio value="2"></ion-radio>
</ion-item>
<ion-item>
<ion-label>{{question.optionC}}</ion-label>
<ion-radio value="3"></ion-radio>
</ion-item>
<ion-item>
<ion-label>{{question.optionD}}</ion-label>
<ion-radio value="4"></ion-radio>
</ion-item>
</ion-list>
Run Code Online (Sandbox Code Playgroud)
如何在mcqQuesiton()上获得离子无线电值(离子变化).
我在一个页面上有数字或无线电组,因为它是一个多选题页面.
我无法理解在Angular-2 cli项目的src文件夹中使用tsconfig.app.json.我知道tsconfig.json是由typescript编译器使用的,为什么tsconfig.app.json?
我在Ionic2学习angularfire2
const newUser = this._db.list('/users');
setTimeout(() => {
newUser.push(this.userInfo)
.then((data) => console.log(data))
},3000)
Run Code Online (Sandbox Code Playgroud)
我想知道在推送新数据时是否可以设置自定义密钥.我在互联网上尝试了各种建议,在插入后更新密钥,但没有成功.
我想在使用angular-cli构建的angular2项目中包含underscore.js .直到现在我无法这样做.我到目前为止尝试过:
1- npm安装下划线--save
2- tsd安装下划线
3- script src ="node_modules/underscore/underscore.js",index.html中的引用
4-在system-config.js中
/** Map relative paths to URLs. */
var map = {
'underscore': '../node_modules/underscore/underscore.js'
};
/** User packages configuration. */
var packages = {
'underscore': '../node_modules/underscore/underscore.js'
};
Run Code Online (Sandbox Code Playgroud)
5- import*as _ from'underscore';
但是在运行期间,underscore.js没有被复制到'dist'目录中,并且浏览器抱怨没有找到underscore.js.我想我在第4点缺少一些东西.当我开始学习angular2时,非常感谢任何帮助.请记住,这个项目是由angular-cli制作的,而不是任何其他种子项目.除了Underscore.js,项目工作正常.
[编辑] package.json在依赖项中有"下划线":"^ 1.8.3"
我已将 nodemon 安装为 dev-dependency。
我做了一个脚本 "devserver": "./node_modules/nodemon/bin/nodemon.js index.js"
但是当我运行时npm run devserver它给出了错误'.' is not recognized as an internal or external command。
请帮忙。
我正在尝试使用 python s3fs 读取 S3 AWS 中的文件。
我找不到将凭证(访问密钥 + 秘密)放入 s3fs 代码的代码。
任何人都可以帮助我如何设置此信息以及 s3fs 代码。
import s3fs
fs = s3fs.S3FileSystem(anon=True)
Run Code Online (Sandbox Code Playgroud)
我目前使用的是 Windows 10。
angular ×4
ionic2 ×2
angular-cli ×1
angular2-cli ×1
angularfire2 ×1
dom-events ×1
firebase ×1
html ×1
jasmine ×1
karma-runner ×1
node.js ×1
npm ×1
python ×1
python-s3fs ×1
sonarqube ×1
typescript ×1