这是我第一次使用Firebase。我使用Firebase CLI部署了我的角度项目,但是当我导航到指定的域时,我只会看到
欢迎
Firebase Hosting安装完成
您会看到此信息,因为您已经成功设置了Firebase Hosting。
现在是时候构建非凡的东西了!
这是我的部署过程:
firebase login
? Success! Logged in as [...]
firebase init
select Hosting, select project, chose 'dist' as public dir
? Firebase initialization complete!
ng build --prod
firebase deploy
? Deploy complete!
Run Code Online (Sandbox Code Playgroud)
现在已经60多分钟了,我不知道为什么它不在线。60分钟的时间不够火力基地吗?谁能分享他的经验或给我提示,为什么它不在线?
先感谢您
我正在尝试学习 JavaScript,当我开始 MDN 教程时,我尝试单独做第一个练习,到目前为止效果还不错。但有一种情况非常奇怪。
游戏会生成一个 1 - 100 之间的随机数,用户有 10 次猜测来找出该数字。
为此,我将游戏简化为 1 - 10。
当随机数是 9 而我猜是 10 时,代码表示我的输入太低。我不明白为什么会这样。在所有其他情况下,它都完全按照预期工作。
出于调试原因,第一次猜测后,随机数将显示在对话框中。
这是我的代码:
var number = 0;
var turns = 0;
var guess = 0;
var won = false;
playGame();
function playGame() {
won = false;
number = (Math.random() * 10).toFixed(0);
guess = prompt("Guess a number from 1 to 10");
turns = 0;
while(turns < 10) {
console.log(number + " " + guess);
if(guess < number) {
turns++;
guess = prompt("Number …Run Code Online (Sandbox Code Playgroud) 我目前正在学习 Angular 6,但遇到了一些问题。我正在使用本教程:https : //www.yearofmoo.com/2017/06/new-wave-of-animation-features.html
当我单击按钮时,动画按预期触发,但在淡出后文本再次弹出。任何想法为什么它会切换回原始状态?
提前致谢
应用程序组件.html
<button (click)="toggle()">Toggle Fade</button>
<div [@someCoolAnimation]="bindingVar">hello there</div>
Run Code Online (Sandbox Code Playgroud)
app.component.ts
import { Component } from '@angular/core';
import {trigger, transition, style, animate} from "@angular/animations";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
animations: [
trigger('someCoolAnimation', [
transition('* => fadeIn', [
style({ opacity: 0 }),
animate(1000, style({ opacity: 1 }))
]),
transition('* => fadeOut', [
animate(1000, style({ opacity: 0 }))
])
])
]
})
export class AppComponent {
bindingVar = '';
fadeIn() {
this.bindingVar = 'fadeIn';
} …Run Code Online (Sandbox Code Playgroud)