2016-09-16 55 views
0

因爲我是一個新手在打字稿我沒有得到答案,如何調用我的角度組件「summaryReport」按鈕單擊,這裏是我的演示code.let說我有一個按鈕已呼籲openPdf我的組件()點擊,如何調用角1.5按鈕點擊組件

<md-button ng-click="$ctrl.openPdf()">Summary Report</md-button> 

My Component code is, 

namespace mitchell.audit.estimate { 
export class SummaryReportComponent { 
    static ngComponentName = 'summaryReport'; 
} 
angular.module(ngModuleName) 
    .component(SummaryReportComponent.ngComponentName, { 
     bindings: { 
      estimateId: '@', 
     }, 
     templateUrl: 'src/app/estimate/pdfReport/pdfSummary-report.component.html', 
     controller: PdfSummaryReportController 
    }); 

} ,我想打電話給我的組件模板,

<summary-report flex layout="column" estimate-id="$ctrl.estimateId" style="display:none;"></summary-report> 

我也試圖通過把「」在調用此組件模板一個HTML文件將被加載按鈕點擊,但這也不起作用。請幫助我找到正確的方法或解決方案,點擊按鈕單擊我的組件模板。 感謝MANISHA

+0

任何一個可以請回復 – Manisha

+0

我沒有得到爲什麼沒有專家甚至說 – Manisha

回答

0

您可以使用$編譯加載你的組件