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

鍍金池/ 問答/ HTML5問答
我甘愿 回答

jq插件事件不在angular變化監(jiān)測范圍內。請在監(jiān)聽jq事件后手動調用檢測器事件。

import { ..., ChangeDetectorRef } from '@angular/core';
...
constructor(
   ...,
   private changeDetectorRef:ChangeDetectorRef
) { }

ngAfterViewInit() {
   ...
   this.edit.on('summernote.change', () =>  {
       this._setTest();
       this.changeDetectorRef.detectChanges()
   });
}
莓森 回答

在main.js中使用 就ok
import Vconsole from ‘vconsole‘
let vConsole = new Vconsole()

眼雜 回答
  1. 使用 history.replaceState() 方法,只保留 D 頁面的記錄
  2. 監(jiān)聽 popstate 事件
$(window).on('popstate', function () {
    // 省略了邏輯判斷
    window.history.go(-3);
});
玄鳥 回答

iframe頁面樣式調試麻煩,出現(xiàn)多個滾動條,瀏覽器的后退按鈕失效,iframe過多會增加服務器的HTTP請求,產生多個頁面,不易管理,不容易打印,還有就是代碼復雜,無法被一些搜索引擎解讀。

兮顏 回答

字符串轉成number?

心夠野 回答

代碼全一點兒

情已空 回答

你這個應該扔豬八戒 或者其他外包網(wǎng)站實在點

獨白 回答

兄弟,你定義了2個bigFish module。
angular.module函數(shù)為2個參數(shù)時就是創(chuàng)建一個模塊了。

愛是癌 回答

給你一個輪子:Element-angular
他們的做法是:

 upload(path: string, file: File): Observable<any> {
    const req: HttpRequest<{}> = new HttpRequest('POST', path, file, {
      headers: this.headers,
      reportProgress: true,
      withCredentials: this.withCredentials,
    })
    return this.http.request(req)
  }

直接傳文件,并未做過多的處理。

失魂人 回答

這個肯定是你請求接口獲取商品詳情的時候,接口會有字段告訴你當前商品用什么樣式展示,你加判斷引用對應的css不就可以了嗎?

魚梓 回答

axios發(fā)出的請求的數(shù)據(jù)格式是json字符串,在調試工具查看請求頭的時候可以看到發(fā)送的數(shù)據(jù)為Request Payload
兩種解決方法,一種如上@xialeistudio所說后臺使用json_decode解碼,還有一種是前端使用querystringqs轉換數(shù)據(jù)格式為Form Data,這樣后臺就能直接只用$_POST接收參數(shù)

短嘆 回答

pictures不應該是數(shù)組嗎,里面有很多項,你看看setData后是不是變成一項了

氕氘氚 回答

JS代碼:

function cal(){
/* var num= parseInt(document.myform.num.value);    
     var price=parseFloat(document.myform.price.value);    
  var cost=parseFloat(document.myform.cost.value);
  var amount=num*price+cost;
  document.myform.amount.value=amount;    
*/
 alert(document.getElementById("shopN").value);/**/
 }

html代碼變更:

<input  type="text" id="shopN" value="諾基亞N95" onload="print"     oninput="aa(event)"  onporpertychange="aa(event)" />

<input  type="text" id="shopN" value="諾基亞N95"/>/*修改后的*/
熊出沒 回答
折中方案:在生成的標簽上包裹一層,在包裹的那一層加上指令標簽,點擊后觸發(fā)指令獲取到點擊到的元素,拿到url創(chuàng)建動態(tài)組件,實現(xiàn)放大??赡?code>innerHtml插入的標簽,ng不會識別任何指令吧。

思考:創(chuàng)建動態(tài)組件后,會調用applicationRef.bootstrap來初始化組件,并觸發(fā)變換檢測。(初始化后ng就能識別組件中的指令),是不是可以把動態(tài)html扔到一個組件中,然后初始化這個組件,是否能識別動態(tài)html中的指令呢。

哎呦喂 回答

圖片描述
CSS 權重問題,只要你給的樣式優(yōu)先級比這個高就行,暴力點就直接給個 !important。

礙你眼 回答

大括號里面是js語法,就按照js語法注釋,至于字符串嘛,就是字符串了,有啥注釋

茍活 回答

你應該把進退場動畫放在動態(tài)元素上。

<div *ngFor="let item of projects" [@myanim]>
   ...
</div>
懶洋洋 回答

可以在指令的宿主元素下加一個ng-container作為動態(tài)組件容器,ng-container會在渲染時消失。
指令可以做一些修改:

@Directive({
  selector: '[appTxt]'
})
export class TxtCopyDirective {

  @Input('appTxt') dyView:any

  constructor(
    private el: ElementRef, 
    private renderer2: Renderer2, 
    public viewContainerRef: ViewContainerRef, 
    private componentFactoryResolver: ComponentFactoryResolver
  ) {}

  @HostListener('click', ['$event']) onclick(event: any) {
    this.dyView.clear();
    const componentFactory = this.componentFactoryResolver.resolveComponentFactory(動態(tài)組件);
    this.dyView.createComponent(componentFactory);
  }

}

目標元素:

<span [appTxt]="dyView">
  click
  <ng-container #dy></ng-container>
</span>

目標元素所在組件獲取ng-container容器作為參數(shù)傳給指令:

@ViewChild('dy',{read:ViewContainerRef}) dyView:ViewContainerRef
刮刮樂 回答

devserver里加上

historyApiFallback: {
      // Paths with dots should still use the history fallback.
      // See https://github.com/facebookincubator/create-react-app/issues/387.
      disableDotRule: true,
    },