More template fixes
This commit is contained in:
Родитель
6422fe3bba
Коммит
c20445d206
|
@ -19,17 +19,17 @@ class WeightsCtrl {
|
|||
}
|
||||
|
||||
interface IStateParams extends ng.ui.IStateParamsService {
|
||||
chatId: string;
|
||||
weightId: string;
|
||||
}
|
||||
|
||||
class ChatDetailCtrl {
|
||||
public $inject = ['Chats', '$stateParams'];
|
||||
chat: Object;
|
||||
class WeightDetailCtrl {
|
||||
public $inject = ['Weights', '$stateParams'];
|
||||
weight: Object;
|
||||
constructor(
|
||||
public Chats: Services.IWeightsService,
|
||||
public Weights: Services.IWeightsService,
|
||||
public $stateParams: IStateParams
|
||||
) {
|
||||
this.chat = Chats.get($stateParams.chatId);
|
||||
this.weight = Weights.get($stateParams.weightId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,5 +45,5 @@ class SettingsCtrl {
|
|||
angular.module('starter.controllers', [])
|
||||
.controller('DashCtrl', DashCtrl)
|
||||
.controller('WeightsCtrl', WeightsCtrl)
|
||||
.controller('ChatDetailCtrl', ChatDetailCtrl)
|
||||
.controller('WeightDetailCtrl', WeightDetailCtrl)
|
||||
.controller('AccountCtrl', SettingsCtrl);
|
||||
|
|
|
@ -46,10 +46,10 @@ module Services {
|
|||
all() {
|
||||
return this.weights;
|
||||
};
|
||||
remove(weights) {
|
||||
this.weights.splice(this.chats.indexOf(weight), 1);
|
||||
remove(weight) {
|
||||
this.weights.splice(this.weights.indexOf(weight), 1);
|
||||
};
|
||||
get(chatId) {
|
||||
get(weightId) {
|
||||
for (var i = 0; i < this.weights.length; i++) {
|
||||
if (this.weights[i].id === parseInt(weightId)) {
|
||||
return this.weights[i];
|
||||
|
|
Двоичные данные
www/img/perry.png
Двоичные данные
www/img/perry.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 558 KiB |
|
@ -1,7 +1,7 @@
|
|||
<ion-view view-title="Weights">
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="weight in weights.weights" type="item-text-wrap" href="#/tab/weights/{{weight.id}}">
|
||||
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="weight in Weights.weights" type="item-text-wrap" href="#/tab/weights/{{weight.id}}">
|
||||
<img ng-src="{{weight.face}}">
|
||||
<h2>{{weight.name}}</h2>
|
||||
<p>{{weight.lastText}}</p>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<ion-view view-title="Weight Details">
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="weight in weights.weights" type="item-text-wrap" href="#/tab/weights/{{weight.id}}">
|
||||
<img ng-src="{{weight.face}}">
|
||||
<h2>{{weight.name}}</h2>
|
||||
<p>{{weight.lastText}}</p>
|
||||
<i class="icon ion-chevron-right icon-accessory"></i>
|
||||
|
||||
<ion-option-button class="button-assertive" ng-click="weights.remove(weight)">
|
||||
Delete
|
||||
</ion-option-button>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
</ion-view>
|
Загрузка…
Ссылка в новой задаче