在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/ HTML5問答
大濕胸 回答

angular針對你說的這個情況提供了解決方案了,
router里面提供了兩個接口[canActivate][1][CanDeactivate][2]

你可以根據(jù)你自己的需求,實現(xiàn)這兩個接口,并配置在router里面,這兩個接口就相當于router的guard,在跳轉(zhuǎn)之前先調(diào)用你的處理邏輯。

這是官方的例子:

class UserToken {}
class Permissions {
  canDeactivate(user: UserToken, id: string): boolean {
    return true;
  }
}

@Injectable()
class CanDeactivateTeam implements CanDeactivate<TeamComponent> {
  constructor(private permissions: Permissions, private currentUser: UserToken) {}

  canDeactivate(
    component: TeamComponent,
    currentRoute: ActivatedRouteSnapshot,
    currentState: RouterStateSnapshot,
    nextState: RouterStateSnapshot
  ): Observable<boolean>|Promise<boolean>|boolean {
    return this.permissions.canDeactivate(this.currentUser, route.params.id);
  }
}

@NgModule({
  imports: [
    RouterModule.forRoot([
      {
        path: 'team/:id',
        component: TeamCmp,
        canDeactivate: [CanDeactivateTeam]
      }
    ])
  ],
  providers: [CanDeactivateTeam, UserToken, Permissions]
})
class AppModule {}
傲寒 回答

clipboard.png
找到了 在這里 每250ms觸發(fā)一次 都可以獲得當前的播放進度

毀憶 回答

git config --global url."https://".insteadOf git://

f8app在window安裝教程
http://blog.csdn.net/industri...

蟲児飛 回答

把調(diào)用函數(shù)與回調(diào)函數(shù)分開寫,在window下注冊回調(diào)函數(shù),讓app去調(diào)用,這樣就可以拿到回調(diào)結(jié)果了。

陌顏 回答

這個api不怎么好用,需要支持 gps設備,并且是https協(xié)議下;

pc - chrome - google

毀憶 回答

nginx, srs都可以,需求太模糊了,可以詳細說一下

憶往昔 回答

已解決,直接render TreeNode的title就行

你的瞳 回答

使用webP插件可以實現(xiàn),在<body></body>之間插入如下代碼,即可使用WebP了。
當前版本共3個文件:WebP.js,WebP.swfWebP.htc。在此下載打包文件。

<script type="text/javascript" src="WebP.js"></script>
怣痛 回答

你這個時間范圍rules使用的什么表單驗證插件啊?求教~~

貓館 回答

<Table columns={columns} dataSource={data} scroll={{ y: 你需要的高度 }}

多看文檔

悶油瓶 回答

區(qū)分開發(fā)環(huán)境和生產(chǎn)環(huán)境
也就是說開發(fā)環(huán)境用本地同步開發(fā)的B1, 生產(chǎn)環(huán)境用發(fā)布的npm包 B2。

實現(xiàn)方式通過DefinePlugin:

new webpack.DefinePlugin({
            "BName": `"${process.env.NODE_ENV === 'development' ? '/path/to/B1' : 'B2'}"`
        }),

業(yè)務代碼就是

B = require(Bname)
款爺 回答

加一個定時器不就好了,click 的時候開啟,60秒 之后打印出來,并停止計時。

離魂曲 回答

不好升。。。。雖然1.5.x打著過渡版的旗號。

陌如玉 回答

不是很清楚 Angular 的語法,不過原理是一樣的,可以dug調(diào)試組件生命周期的初始化階段,查看下數(shù)據(jù)問題,應該是渲染了空數(shù)據(jù)

撥弦 回答

確實,點開可以彈出Alert,但是存在執(zhí)行Js不一定就可以拿到cookie,比如HTTP-only

下墜 回答

我也遇到這個問題,filed 哈哈 我是上傳圖片的時候遇到的 這個是后臺的問題吧 我的是后臺解決的 當時還想著寫一個博客記錄一下 沒有記錄

互擼娃 回答
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<canvas></canvas>
<script>
    window.onload = function () {
        const canvas = document.getElementsByTagName('canvas')[0]
        const ctx = canvas.getContext("2d");
        const w = document.documentElement.clientWidth;
        const h = document.documentElement.clientHeight;
        canvas.width = w;
        canvas.height = h;
        let mols = []
        function  init() {
            let mol = new generate_mol(1)
            mols.push(mol);
        }
        function draw(){
            canvas.width = canvas.width;
            for(var i=0;i<mols.length;i++){
                var m = mols[i];
                m.draw();
            }
        }
        function  generate_mol(mol) {
            this.x = w*0.3;
            this.y = h*0.3;
            // this.vx = Math.random()*-2;
            // this.vy = Math.random()*2;
            // this.vr = 0.1;
            this.r = Math.random()*Math.PI;
            this.draw = function() {
                // ctx.save();
                // ctx.translate(this.x + 20, this.y + 80);
                // ctx.rotate(Math.PI * 0.17);
                // ctx.translate(-this.x + 20, -this.y - 80);
                // ctx.beginPath();
                // ctx.moveTo(this.x, this.y + 30);
                // ctx.lineTo(this.x - 26, this.y + 45);
                // ctx.lineTo(this.x - 26, this.y + 75);
                // ctx.lineTo(this.x, this.y + 90);
                // ctx.lineTo(this.x + 26, this.y + 75);
                // ctx.lineTo(this.x + 26, this.y + 45);
                // ctx.lineTo(this.x, this.y + 30);
                // ctx.moveTo(this.x - 20, this.y + 47);
                // ctx.strokeStyle = "rgba(0,0,0,0.2)";
                // ctx.lineWidth = 3;
                // ctx.stroke();
                // ctx.closePath();
                // ctx.restore()
                ctx.fillStyle = "rgba(0,0,0,0.5)";
                ctx.font = "15px Arial";
                ctx.fillText("A", this.x+40 , this.y+80);

                ctx.save();
                ctx.translate(this.x + 20, this.y + 30);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.fillStyle = "rgba(0,0,0,0.5)";
                ctx.font = "15px Arial";
                ctx.fillText("B", this.x , this.y+70);
                ctx.closePath();
                ctx.restore()

                ctx.save();
                ctx.translate(this.x + 68, this.y + 56);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()

                ctx.save();
                ctx.translate(this.x + 66, this.y + 110);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()

                ctx.save();
                ctx.translate(this.x + 20, this.y + 135);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()
                //
                ctx.save();
                ctx.translate(this.x -27,this.y + 108);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()

                ctx.save();
                ctx.translate(this.x -26, this.y + 56);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()
            }
        }
        init()
        draw()
    }
</script>
</body>
</html>

沒畫好 畫偏了
應該還要加算法 來生成指定個數(shù)的
預覽地址

有點壞 回答

(1)你在切換導航的時候給個類型區(qū)別,你可以在url添加一個錨點,例如http://localhost:8086/topic/index?nav=XXX.(XXX就是點擊nav名字)
(2)

<ul>
    <li data-type=“wangye”>網(wǎng)頁</li>
    <li data-type=“xinwen”>新聞</li>
    <li data-type=“tieba”>貼吧</li>
</ul>

(3)用jquery或者js或者angularjs里自帶的路由獲取url里的XXX,讓li里的data-type值與XXX相等的添加高亮狀態(tài)。當然你也可以不用data-type,用id也可以。例如:

<ul>
    <li id=“wangye”>網(wǎng)頁</li>
    <li id=“xinwen”>新聞</li>
    <li id=“tieba”>貼吧</li>
</ul>

$(XXX).addClass(高亮class);把XXX當id即可;
(4)好處:頁面刷新,選中的高亮狀態(tài)也不會消失,到達預期效果。 壞處:代碼不夠優(yōu)美,有待優(yōu)化與改善