angular

    0熱度

    2回答

    我有一個從服務器獲取數據的組件和服務器返回一個字符串JSON就像: "{ "name": "John Doe", "age": "5", "addresses": [ {"street": "123 Street", "city": "Main City"} ] }" 所以,當我收到這在我的組件我做的: let result = JSON.p

    0熱度

    1回答

    我有我的應用程序的一部分,這是一個聊天應用程序,其中任我打「提交」按鈕,textarea的缺失輸入與虛擬鍵盤關閉。我試圖通過在表單提交後立即重新聚焦textarea來解決這個問題。問題是,當我在瀏覽器中使用Ionic時,此功能正常工作,但只要我在iOS設備上測試它,它就拒絕重新調整textarea。這裏是我的HTML模板代碼: <div class="create-message-block">

    0熱度

    2回答

    你好我收到試圖安裝使用NPM任何軟件包使用命令故宮安裝「包名」安裝時出現以下錯誤: npm ERR! path C:\Users\abecker\Documents\Git-ng2-Admin\file:..\has-unicode\package.json npm ERR! code ENOPACKAGEJSON npm ERR! errno -4058 npm ERR! syscall

    0熱度

    2回答

    我試圖從/users列表檢索數據並收到此錯誤:下面 Type 'Subscription' is not assignable to type 'FirebaseListObservable'. Property '$ref' is missing in type 'Subscription'. 是我的代碼: import { Injectable } from '@angular/core';

    4熱度

    2回答

    下面的代碼是我的組件 @Component({ selector: 'my-app', template: '<div>{{name}}</div>' }) export class MyApp { name: String = ''; constructor(){ this.name = 'Mr_Perfect'; } }

    0熱度

    2回答

    我是angular2中的新成員。我正在使用ng2-uploader上傳文件。 我html的我用下面的代碼: <input type="file" ngFileSelect [options]="options" (onUpload)="handleUpload($event)" (beforeUpload)="beforeUpload($event)"> 在組件: uploadFile: an

    2熱度

    3回答

    <select class="form-control selectpicker" data-style="form-control btn-primary" [(ngModel)]="serverName" > <option data-content="<i class='glyphicon glyphicon-cutlery'></i>" *ngFor="let instance

    1熱度

    1回答

    你好,我有複選框的下拉菜單,我點擊下拉菜單項時遇到了調用函數的問題。這裏是我的代碼: <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> <li *ngFor="let filter of column.filters"> <div class="checkbox"> <label><in

    -1熱度

    2回答

    我已經在index.html(Angular2)中靜態使用meta標籤。但是Facebook在分享時並沒有採用元標籤。 <meta property="og:description" content="Test description"/> <meta property="og:image" content="https://www.w3schools.com/css/trolltung

    1熱度

    1回答

    我得到錯誤:我的腳本無效的事件目標我之前用@ViewChild沒有任何問題,但當我嘗試使用FormGroup時,我得到了錯誤! import { Component , OnInit } from '@angular/core'; import {FormGroup,FormBuilder} from '@angular/forms'; import {Observable} from 'rx