cotacts now in client config

This commit is contained in:
tmshv committed 2016-02-25 18:06:41 +03:00
1 parent 1bb8c96c07
commit 5c72276b5e
3 files changed
+18 -14

No files matched your search

+12
View File
@@ -1,3 +1,15 @@
import {stringReplace} from '../utils/string';
const nbsp = 0xA0;
export let contacts = {
telephone: '+7 (81362) 76-312',
email: 'hudozka@gmail.com',
address: ['г. Шлиссельбург', 'ул. 18 января', 'д. 3']
.map(stringReplace(' ', String.fromCharCode(nbsp)))
.join(' ')
};
export let collectiveSortPattern = [
'mg-timasheva',
'va-sarzhin',
+6 -4
View File
@@ -1,7 +1,9 @@
import {contacts} from '../config';
export default function (app) {
app.controller('ContactsController', ($scope, config) => {
$scope.address = config.address;
$scope.telephone = config.telephone;
$scope.email = config.email;
app.controller('ContactsController', $scope => {
$scope.address = contacts.address;
$scope.telephone = contacts.telephone;
$scope.email = contacts.email;
});
};
-10
View File
@@ -8,14 +8,4 @@ angular.module("hudozhka.data", [])
})
.service("docs", function () {
return require("../models/document");
})
.service("config", function(){
return {
telephone: "+7 (81362) 76-312",
email: "hudozka@gmail.com",
address: ["г. Шлиссельбург", "ул. 18 января", "д. 3"]
.reduce(function(address, item){
return address + (address == '' ? '' : ' ') + item.replace(' ', String.fromCharCode(0xA0));
}, '')
};
});