Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
angular-translate-storage-cookie
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Custom Issue Tracker
Custom Issue Tracker
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angularjs
angular-translate-storage-cookie
Commits
944bd2db
Commit
944bd2db
authored
Aug 03, 2018
by
bingchuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] version 2.13.1
parents
Pipeline
#52
failed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
0 deletions
+110
-0
angular-translate-storage-cookie.js
angular-translate-storage-cookie.js
+97
-0
bower.json
bower.json
+13
-0
No files found.
angular-translate-storage-cookie.js
0 → 100644
View file @
944bd2db
/*!
* angular-translate - v2.13.1 - 2016-12-06
*
* Copyright (c) 2016 The angular-translate team, Pascal Precht; Licensed MIT
*/
(
function
(
root
,
factory
)
{
if
(
typeof
define
===
'function'
&&
define
.
amd
)
{
// AMD. Register as an anonymous module unless amdModuleId is set
define
([],
function
()
{
return
(
factory
());
});
}
else
if
(
typeof
exports
===
'object'
)
{
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module
.
exports
=
factory
();
}
else
{
factory
();
}
}(
this
,
function
()
{
$translateCookieStorageFactory
.
$inject
=
[
'$cookieStore'
];
angular
.
module
(
'pascalprecht.translate'
)
/**
* @ngdoc object
* @name pascalprecht.translate.$translateCookieStorage
* @requires $cookieStore
*
* @description
* Abstraction layer for cookieStore. This service is used when telling angular-translate
* to use cookieStore as storage.
*
*/
.
factory
(
'$translateCookieStorage'
,
$translateCookieStorageFactory
);
function
$translateCookieStorageFactory
(
$cookieStore
)
{
'use strict'
;
var
$translateCookieStorage
=
{
/**
* @ngdoc function
* @name pascalprecht.translate.$translateCookieStorage#get
* @methodOf pascalprecht.translate.$translateCookieStorage
*
* @description
* Returns an item from cookieStorage by given name.
*
* @param {string} name Item name
* @return {string} Value of item name
*/
get
:
function
(
name
)
{
return
$cookieStore
.
get
(
name
);
},
/**
* @ngdoc function
* @name pascalprecht.translate.$translateCookieStorage#set
* @methodOf pascalprecht.translate.$translateCookieStorage
*
* @description
* Sets an item in cookieStorage by given name.
*
* @deprecated use #put
*
* @param {string} name Item name
* @param {string} value Item value
*/
set
:
function
(
name
,
value
)
{
$cookieStore
.
put
(
name
,
value
);
},
/**
* @ngdoc function
* @name pascalprecht.translate.$translateCookieStorage#put
* @methodOf pascalprecht.translate.$translateCookieStorage
*
* @description
* Sets an item in cookieStorage by given name.
*
* @param {string} name Item name
* @param {string} value Item value
*/
put
:
function
(
name
,
value
)
{
$cookieStore
.
put
(
name
,
value
);
}
};
return
$translateCookieStorage
;
}
$translateCookieStorageFactory
.
displayName
=
'$translateCookieStorage'
;
return
'pascalprecht.translate'
;
}));
bower.json
0 → 100644
View file @
944bd2db
{
"name"
:
"angular-translate-storage-cookie"
,
"description"
:
"A plugin for Angular Translate"
,
"version"
:
"2.13.1"
,
"main"
:
"./angular-translate-storage-cookie.js"
,
"ignore"
:
[],
"author"
:
"Pascal Precht"
,
"license"
:
"MIT"
,
"dependencies"
:
{
"angular-translate"
:
"~2.13.1"
,
"angular-cookies"
:
">=1.2.26 <1.6"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment