{"id":246829,"date":"2014-12-26T14:45:02","date_gmt":"2014-12-26T10:45:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=246829"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=246829","title":{"rendered":"<span class=\"post_title\">\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 AngularJS \u0438 Firebase<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t\u0412 <a href=\"http:\/\/habrahabr.ru\/post\/244209\/\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e Firebase. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c AngularJS \u0438 Firebase. <\/p>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e, \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0434 \u0441\u0432\u043e\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u0442\u043e \u044d\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 SPA-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0434\u0443\u043c\u0430\u044e \u0432 \u0441\u043a\u043e\u0440\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044f \u0441\u043c\u043e\u0433\u0443 \u0440\u0430\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043d\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u043d\u043e \u043f\u043e\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u0447\u0435\u043c\u0443 \u044f \u0432\u044b\u0431\u0440\u0430\u043b Firebase? \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u044f \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u043d\u0438\u0432\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0438 \u043d\u0435 \u043b\u044e\u0431\u043b\u044e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b, \u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043a\u0443\u0447\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e ngBoilerplate, \u0442\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u044e \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043e\u0441\u043e\u0431\u044b\u0445 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a. \u0412 \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b Twitter Bootstrap, Angular UI, Angular Bootstrap, Font Awesome \u0438 LESS. \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d Grunt \u0438 Bower. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:  <\/p>\n<pre><code class=\"bash\">$ git clone git:\/\/github.com\/joshdmiller\/ng-boilerplate $ cd ng-boilerplate $ sudo npm -g install grunt-cli karma bower $ npm install $ bower install $ grunt watch <\/code><\/pre>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u0427\u0442\u043e-\u0442\u043e \u044f \u043e\u0442\u043e\u0448\u0435\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442 \u0442\u0435\u043c\u044b, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043c\u043e\u0434\u0443\u043b\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u0437\u0432\u0430\u043b \u0435\u0433\u043e, \u043a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, Auth. \u0412\u043e\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u043e\u043d \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:  <\/p>\n<pre><code class=\"javascript\">angular.module('Auth', [     'firebase' ])  .service('AuthService', [  '$rootScope','$firebase', '$firebaseAuth', '$location', '$q', function AuthService( $rootScope, $firebase, $firebaseAuth, $location, $q ){     var firebaseObj = new Firebase('https:\/\/your-firebase-app.com\/');     var userStorageKey = 'authUser';     var authUser = $.jStorage.get(userStorageKey) || { status:false, data: false };      return {         createUserByEmail: function(email, password){             var deferred = $q.defer();             firebaseObj.createUser({                 email    : email,                 password : password             }, function(error) {                 if (error === null) {                     deferred.resolve({                         status: true                     });                 } else {                     deferred.resolve({                         status: false,                         error: error                     });                 }             });              return deferred.promise;         },         signInUserByEmail: function(email, password){             var deferred = $q.defer();             firebaseObj.authWithPassword({                 email    : email,                 password : password             }, function(error, data) {                 if (error === null) {                     \/\/ user authenticated with Firebase                     authUser = {                         status: true,                         data: data                     };                     deferred.resolve(authUser);                     $.jStorage.set(userStorageKey, authUser);                 } else {                     deferred.resolve({                         status: false,                         error: error                     });                 }             });              return deferred.promise;         },         changeUserPass: function(email, password, newPassword){             firebaseObj.changePassword({                 email       : email,                 oldPassword : password,                 newPassword : newPassword             }, function(error) {                 if (error === null) {                     console.log(&quot;Password changed successfully&quot;);                 } else {                     console.log(&quot;Error changing password:&quot;, error);                 }             });         },         resetAndSendPassword: function(email){             firebaseObj.resetPassword({                 email : email             }, function(error) {                 if (error === null) {                     console.log(&quot;Password reset email sent successfully&quot;);                 } else {                     console.log(&quot;Error sending password reset email:&quot;, error);                 }             });         },         deleteUser: function(email, password){             firebaseObj.removeUser({                 email    : email,                 password : password             }, function(error) {                 if (error === null) {                     console.log(&quot;User removed successfully&quot;);                 } else {                     console.log(&quot;Error removing user:&quot;, error);                 }             });         },         getUserState:function(){             \/\/console.info(Date(authUser.data.expires));              console.info(authUser);             if(authUser.data){                 var data = firebaseObj.getAuth();                 authUser = {                     status: data ? true : false,                     data: (data == null) ? {} : data                 };                 $.jStorage.set(userStorageKey, authUser);             }             return authUser.status;         },         logOut: function(){             $firebaseAuth(firebaseObj).$unauth();             $.jStorage.deleteKey(userStorageKey);             $rootScope.$userState = this.getUserState();         },         getAuthUser: function(){             return authUser.data;         }     }; }])  .directive('signInForm', [ '$rootScope', 'AuthService', '$location', function( $rootScope, AuthService, $location){     return{         restrict: 'A',         templateUrl: 'auth\/templates\/sign-in.tpl.html',         link: function(scope, element, attrs){             scope.userEmail = '';             scope.userPassword = '';             scope.userState = AuthService.getUserState();              scope.signInUserByEmail = function(){                 AuthService.signInUserByEmail(scope.userEmail, scope.userPassword)                 .then(function(response){                     scope.userState = AuthService.getUserState();                     if(scope.userState) {                         alert('You are logged in');                         $location.path('profile');                     }                     else{                         alert('Incorrect user email or password');                     }                 });             };         }     }; }])  .directive('signUpForm', [ '$rootScope', 'AuthService', '$location', function( $rootScope, AuthService, $location){     return{         restrict: 'A',         templateUrl: 'auth\/templates\/sign-up.tpl.html',         link: function(scope, element, attrs){             scope.userEmail = '';             scope.userPassword = '';             scope.facebookEnabled = false;             scope.userState = AuthService.getUserState();             scope.isRegistered = false;              scope.createUser = function(){                 AuthService.createUserByEmail(scope.userEmail, scope.userPassword)                 .then(function(response){                     if(response.status){                         alert(&quot;Congratulations! You've successfully signed up. You can authorize&quot;);                         scope.isRegistered = true;                     }                     else{                         alert(response.error);                     }                 });             };         }     }; }]) ; <\/code><\/pre>\n<p>  \u041e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: \u0441\u0435\u0440\u0432\u0438\u0441 (AuthService) \u0438 \u0434\u0432\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b (\u043e\u0434\u043d\u0430 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u044b \u043b\u043e\u0433\u0438\u043d\u0430 \u2014 signInForm, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u2014 signUpForm). \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442, \u043d\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0441\u0435\u0440\u0432\u0438\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0435 \u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0412\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:  <\/p>\n<ul>\n<li>createUserByEmail \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f email<\/li>\n<li>signInByEmail \u2014 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e email<\/li>\n<li>changeUserPass \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f<\/li>\n<li>resetAndSendPassword \u2014 \u0442\u043e\u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f, \u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0442\u0430\u0440\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0431\u0440\u043e\u0448\u0435\u043d, \u0430 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u0434\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430 \u043f\u043e\u0447\u0442\u0443<\/li>\n<li>deleteUser \u2014 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/li>\n<li>getUserState \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0430\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u043b\u0438 \u043d\u0435\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/li>\n<li>logOut \u2014 \u044d\u0442\u043e \u043b\u043e\u0433\u0430\u0443\u0442 (\u0441\u043f\u0430\u0441\u0438\u0431\u043e \u043a\u044d\u043f)<\/li>\n<li>getAuthUser \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/li>\n<\/ul>\n<p>  \u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u0432 \u043a\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c jStorage \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435. \u0412\u044b\u0431\u043e\u0440 \u043d\u0430 \u043d\u0435\u0433\u043e \u043f\u0430\u043b \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438 (\u0434\u0430\u0436\u0435 IE6).<\/p>\n<p>  \u041d\u0443 \u044d\u0442\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\/\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Firebase. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e\/\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 (Google, Facebook, Twitter, GitHub) \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Firebase, \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u043e\u0432 \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0438 \u043a \u0441\u0432\u043e\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c.<\/p>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0435 \u044f \u043d\u0435 \u0437\u043d\u0430\u044e \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u044b\u0435 \u0432\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0421\u043e\u0432\u0435\u0442\u0430\u043c \u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f\u043c \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0443 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434.      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/246829\/\"> http:\/\/habrahabr.ru\/post\/246829\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t\u0412 <a href=\"http:\/\/habrahabr.ru\/post\/244209\/\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e Firebase. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c AngularJS \u0438 Firebase. <\/p>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e, \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0434 \u0441\u0432\u043e\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u0432 \u0432\u043a\u0440\u0430\u0442\u0446\u0435, \u0442\u043e \u044d\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 SPA-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0434\u0443\u043c\u0430\u044e \u0432 \u0441\u043a\u043e\u0440\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044f \u0441\u043c\u043e\u0433\u0443 \u0440\u0430\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043d\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u043d\u043e \u043f\u043e\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u0447\u0435\u043c\u0443 \u044f \u0432\u044b\u0431\u0440\u0430\u043b Firebase? \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u044f \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u043d\u0438\u0432\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0438 \u043d\u0435 \u043b\u044e\u0431\u043b\u044e \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u044b, \u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043a\u0443\u0447\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e ngBoilerplate, \u0442\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u044e \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043e\u0441\u043e\u0431\u044b\u0445 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a. \u0412 \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b Twitter Bootstrap, Angular UI, Angular Bootstrap, Font Awesome \u0438 LESS. \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d Grunt \u0438 Bower. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:  <\/p>\n<pre><code class=\"bash\">$ git clone git:\/\/github.com\/joshdmiller\/ng-boilerplate $ cd ng-boilerplate $ sudo npm -g install grunt-cli karma bower $ npm install $ bower install $ grunt watch <\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-246829","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/246829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=246829"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/246829\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=246829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=246829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=246829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}