emit

    -2熱度

    1回答

    Plunker在這裏: - http://plnkr.co/edit/JaEi7ftnokYhdvBn4fRh?p=preview 我已經發出數據,並且它在data.name下的$ on()中可用。 但是,我無法在UI中使用{{dumbevent1_name}}顯示$ scope.dumbevent1_name 我在做什麼錯了? 代碼: - //代碼放在這裏 angular.module('mya

    0熱度

    1回答

    尋找解決辦法,如何在實例構造函數中指定我在RT中動態創建的支持字段的屬性。簽名與編譯器生成的屬性匹配爲自動屬性。基本上它們將等同於下面列出的代碼。 使用.NET核2.0 問:我如何分配使用發射構造函數中的支持字段? 例如: public class MyClass { public MyClass(int f1, string f2) { _field1 = f1;

    5熱度

    1回答

    這裏不工作低於我的代碼: search.component.html <button (click)="addMe()">Click</button> search.component.ts import { Component, Directive, OnInit, Input, Output, EventEmitter } from '@angular/core'; @Componen

    2熱度

    1回答

    父母的功能我的問題是,就像這樣:Vuejs $emit doesn't fire on callback。 但我在我的項目中使用了superagent。這裏是我的代碼: //Parent.vue <Child v-on:savevideo="toSaveVideo"/> ... methods:{ toSaveVideo:function(data){ console.l

    1熱度

    1回答

    我想將這個值傳遞給一個書呆子控制器,但是無法通過ng-router。 <button type="Submit" ng-click="showUser()">Show Details</button> .when('/geeks', { templateUrl: 'views/geek.html', controller: 'GeekController' })

    2熱度

    1回答

    在MyComponent中,我試圖從事件處理程序發出另一個事件。 (這個新事件將由父組件使用來執行一些操作)。我創建了事件發射器作爲MyComponent的成員,但事件處理程序方法無法訪問事件發射器。它引發ERROR TypeError: Cannot read property 'emit' of undefined。我在StackOverflow上發現了一些相關的問題,但由於剛剛進入Angul

    0熱度

    1回答

    我有一個EventEmitter在父組件中發出一個事件,我希望它從父組件執行一系列指令並將結果返回給調用者,this.filteredList我希望它以包含由父組件返回的列表,但是當它返回時,filteredList是undefined 這是de chid組件「autocomplete.component.ts:」 //當在this.changeFilter.emit中返回時,this.filte

    -1熱度

    2回答

    當客戶端連接到服務器時,消息應該被髮送到控制檯。我沒有得到任何錯誤,所以我很困惑我的問題實際上是什麼。 服務器:正如您所看到的客戶端連接。 客戶端:該消息未出現在控制檯中。 (請原諒我的鏈接,我沒有10個聲望) 如何讓消息打印到控制檯? 我讀過其他職位像這樣的,但他們沒有幫助:(

    0熱度

    2回答

    我試圖調用從子組件父方法發出,但似乎不工作..下面的代碼: 的index.html <div class="percorso"v-on:removeall="pathlengthTozero()"> </div> 部件 Vue.component('lista-percorso', { template:` <div class="col-lg-2 col-xs-2"> <di

    0熱度

    1回答

    如何通過$ emit函數正確地將參數從子項傳遞給父項? 這裏我做了什麼 HTML <lista-servizi-gialla :servizi="modello" v-on:centramappa="mappaCenter(x,y,selected)"></lista-servizi-gialla> COMPONENT template' <span class="pull-right fo