使用" templateUrl "以下代码无效指令但使用" 模板"这段代码正在运作
这种情况有什么问题? 我想使用templateUrl指令而不是模板来区分设计者和程序员!!!
templateUrl和模板是一样的....
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>CONTACTS</ion-title>
<ion-buttons end>
<button ion-button icon-only (click)="openAddContactPage()">
<ion-icon name="add-circle"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-searchbar (ionInput)="getContacts(0, 10, 'contacts','search',$event, '')"></ion-searchbar>
<ion-list>
<ion-item *ngFor="let c of contacts">
<ion-avatar item-left>
<img *ngIf="c.imageId != null" src="{{BACKEND_PATH}}/api/images/{{c.imageId}}">
<img *ngIf="c.imageId.length == 0" src="../../assets/imgs/contact.png">
</ion-avatar>
<h2 bold>{{c.firstName}} {{c.lastName}}</h2>
<p><span *ngIf="c.department != null">{{c.department}}: </span>{{c.job}} </p>
<p>{{c.companyName}}</p>
<p>{{c.imageId}} .. {{c.imageId.length}}</p>
<ion-note item-right>
<ion-icon ios="ios-arrow-dropright" md="md-arrow-dropright"></ion-icon>
</ion-note>
</ion-item>
</ion-list>