Issue
name of cookie "NG_TRANSLATE_LANG_KEY"
And question, how can i change value of this cookie from "ru" to another? for example to "fr" or "kk".
And i should use the angularJS.
Solution
You can use $cookies
dependency injection to achieve this.
There's also a ngCookie provider in angular JS 1.x
See usage above: (put and get methods)
angular.module('cookiesExample', ['ngCookies'])
.controller('ExampleController', ['$cookies', function($cookies) {
// Retrieving a cookie
var favoriteCookie = $cookies.get('myFavorite');
// Setting a cookie
$cookies.put('myFavorite', 'oatmeal');
}]);
Answered By - Ben
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.