文件的图像
我有这个错误,我无法弄明白.我正在尝试导入角度/核心和角度/平台浏览器.我在stackoverflow上关注了许多链接,但没有一个帮助我.
这是我的package.json文件
{ "name": "angular-2", "version": "1.0.0", "scripts": {
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"typings": "typings",
"postinstall": "typings install" }, "license": "ISC", "dependencies": {
"angular2": "2.0.0-beta.13",
"systemjs": "0.19.25",
"es6-shim": "^0.35.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"@angular/router": "3.0.0-alpha.7",
"zone.js": "0.6.6"
}, "devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.1.0",
"typescript": "^1.8.9",
"typings":"^0.7.11" } }
Run Code Online (Sandbox Code Playgroud) 依赖
main.ts文件
我想导入,HTTP_PROVIDERS但是给了我错误
"@ angular/http/index没有HTTP_PROVIDERS的导出成员"
我附上了package.json和main.ts文件的图像.
“细节”在* ngFor从未来的服务器,是它包含列表。我正在从中选择一个项目。我想让该按钮在用户单击时处于活动状态,并且它应该保持活动状态,直到用户从列表中选择另一个选项。我正在使用[ngClass]但它正在激活一个按钮1 到 2秒。
<ion-list>
<button ion-item [ngClass]="configop.selection" *ngFor="let configop of detail" (click)="itemSelected(configop)" >
<div class="ion-item optionalItem">
<div class="ion-button">
<span class="color-code" >
<img src="{{configop.image}}">
</span>
<span class="color-name">{{ configop.name }}</span>
<span class="color-price">{{ configop.price|currency:'PKR':false }}</span>
</div>
</div>
</button>
</ion-list>
.ts file
itemSelected(configop: any) {
if(this.selection !=null){
if(configop.name == this.selection){
this.storage.remove('carPaint');
this.selection=configop.name;
}
else {
this.storage.remove('carPaint');
this.storage.set('carPaint', configop);
this.selection=configop.name;}
}
else { …Run Code Online (Sandbox Code Playgroud)