use scope only
This commit is contained in:
parent
66fc3fe416
commit
e58ac3bd58
2 changed files with 7 additions and 12 deletions
|
|
@ -2,11 +2,10 @@
|
||||||
ng-init="titleSection='Language'; goBackToState = 'preferencesGlobal'; noColor = true">
|
ng-init="titleSection='Language'; goBackToState = 'preferencesGlobal'; noColor = true">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesLanguageController as prefLang" ng-init="prefLang.init()">
|
<div class="content preferences" ng-controller="preferencesLanguageController">
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
|
|
||||||
<ion-radio class="line-b size-12" ng-repeat="lang in prefLang.availableLanguages" ng-value="lang.isoCode" ng-model="data.currentLanguage"
|
<ion-radio class="line-b size-12" ng-repeat="lang in availableLanguages" ng-value="lang.isoCode" ng-model="currentLanguage"
|
||||||
ng-click="prefLang.save(lang.isoCode)">{{lang.name}}
|
ng-click="save(lang.isoCode)">{{lang.name}}
|
||||||
</ion-radio>
|
</ion-radio>
|
||||||
</div>
|
</div>
|
||||||
<div class="extra-margin-bottom"></div>
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,12 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesLanguageController',
|
angular.module('copayApp.controllers').controller('preferencesLanguageController',
|
||||||
function($scope, $log, $timeout, configService, profileService, uxLanguage, walletService, go) {
|
function($scope, $log, configService, profileService, uxLanguage, walletService, go) {
|
||||||
|
|
||||||
this.init = function() {
|
$scope.availableLanguages = uxLanguage.getLanguages();
|
||||||
this.availableLanguages = uxLanguage.getLanguages();
|
$scope.currentLanguage = uxLanguage.getCurrentLanguage();
|
||||||
$scope.data = {
|
|
||||||
currentLanguage: uxLanguage.getCurrentLanguage()
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
this.save = function(newLang) {
|
$scope.save = function(newLang) {
|
||||||
var opts = {
|
var opts = {
|
||||||
wallet: {
|
wallet: {
|
||||||
settings: {
|
settings: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue