;
(function () {
    'use strict';

    const
        apiService = require('app-service'),
        appCache = require('app-cache')
        ;

    angular.module('app.controllers')
        .controller('m_attributeFileCtr', m_attributeFileCtr);
    m_attributeFileCtr.$inject = ['$scope', '$mdDialog', 'file', '$timeout'];
    return;

    function m_attributeFileCtr($scope, $mdDialog, file, $timeout) {

        let vm = $scope;
        vm.file = file;

        apiService.item_detail(file._id).then(e => {

            if (e.data) {
                $timeout(() => {
                    vm.file = e.data
                });
            }
        })

        vm.ok = $mdDialog.hide;

    }
})();
