define(['./module'], function (controllers) {
   'use strict';
    controllers.controller('editorCtrl',['$scope', '$rootScope', '$http', '$routeParams', function ($scope, $rootScope, $http, $routeParams) {
		if ($routeParams.Alias) {
		$http.get('http://ita-kv.tk:8090/api/resources/' + $routeParams.Alias).success(function(data) {
            $scope.resource = data[0];
            $scope.Alias = $routeParams.Alias;
			$scope.Content = $scope.resource.Content;
			$scope.Title = $scope.resource.Title;
            });
		}
		$rootScope.$broadcast('Update', '_full');
		$scope.sendResource = function(Alias, Content, Title) {
			if (Alias == '' || Content == '' || Title == '') {
                $scope.delPhotoErrorMsg = 'Всі поля обов\'язкові для заповнення';
                return;
            }
            $http.put('/api/editResource/' + $routeParams.Alias, {Alias: Alias, Content: Content, Title: Title}).success(function() {
            console.log('Query has been successfully sent');
           }).error(function(status, data) {
                    console.log(status);
                    console.log(data);
                });
		};
	}]);
		});

@@ -244,30 +244,8 @@
 et('
-http://ita-kv.tk:8090/
 api/
@@ -475,16 +475,119 @@
 .Title;%0A
+            $scope.IsResource = $scope.resource.IsResource%0A            $scope.Id = $scope.resource.Id;%0A
         
@@ -696,16 +696,32 @@
 t, Title
+, IsResource, Id
 ) %7B%0A%09%09%09i
@@ -763,16 +763,36 @@
 Title ==
+ '' %7C%7C IsResource ==
  '') %7B%0A 
@@ -933,17 +933,16 @@
 tp.put('
-/
 api/edit
@@ -954,34 +954,18 @@
 rce/' + 
-$routeParams.Alias
+Id
 , %7BAlias
@@ -1003,16 +1003,41 @@
 e: Title
+, IsResource : IsResource
 %7D).succe

Update editorCtrl.js