angular-cli


Angular-Cli Best way to manage notices


I am migrating an old site to my new Angular CLI project and would like to offer my users a notice.
"This is a new site! To access your old account, go here..."
What I need is a method for the user to close the notice and for it never to return. I am using bootstrap, so the closing part is easy enough... however to persist this I would traditionally use a cookie.
What is the best way to do this in Angular, if cookies are the best way, what component should be used?
Thanks!
While cookies are widely used for this purpose, it would not be the right choice. Cookies are meant for data that needs to get to the server with every request.
your best option here is localStorage look at the API here: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
Also look at this quora answer for the difference between sessionStorage, localStorage and cookie. https://www.quora.com/What-is-the-difference-between-sessionstorage-localstorage-and-Cookies
the choice of component is up to you, choose what matches your app.

Related Links

angular cli update issue on local folder
Access to -aot parameter in code
Missing peer dependencies after installing latest angular-cli: What to do?
angular-cli ng serve : Error: No errors
Getting error after Angular cli update
Does angular-cli uses rollup to do ahead-of-time compilation and adding all into one file?
Angular CLI install error
Using glob for assets in angular-cli throws error
Importing Global SCSS into Component SCSS with Angular-CLI
Error during AOT build with angular-cli 24 and Angular 2.4.1
Add importer to node-sass in angular-cli project
angular-cli#1.0.0-beta.23 (2016-12-15) NOT on npm
Angular cli for existing github project
How to pass config data to NgModule so NgModule will be compiled with AOT
Cloning a repo based on Angular CLI
How can I speed up Angular CLI Live Reload - 1-2 minutes per change

Categories

HOME
cil
app-inventor
erlang
visualization
zend-framework2
couchdb-2.0
automated-tests
rfc
user
simpy
triggers
nodemailer
codeblocks
requirejs
ndis
data-analysis
ios10.3
kadanes-algorithm
ng2-dragula
aws-cognito
tweets
nmake
embedly
richfaces
metis
rhandsontable
pentaho-report-designer
cgal
cell-array
ioc-container
strophe
read-write
edb
ifstream
npm-shrinkwrap
hashcat
rider
sonarqube-scan
code-composer
control-flow-graph
stress-testing
apiary
facebook-chatbot
filepath
fqdn
uiviewpropertyanimator
multi-agent
pluck
selenium-firefoxdriver
gmt
gulp-typescript
rsqlite
pdflib
rmongodb
picasa
audioqueue
wcf-ria-services
try-finally
zurb-foundation-apps
linkageerror
pagekit
gradle-eclipse
contour
spring-lemon
date-format
spinlock
servlet-3.0
void
difference
lemoon
registrykey
prezto
on-duplicate-key
virus
utf-32
left-recursion
odftoolkit
snmp4j
mov
libssh2
eclipse-classpath
neoload
cppdepend
data-generation
joox
map-force
uipickerviewcontroller
gamepad
.net-cf-3.5
backbone-relational
client-side-scripting
shiva3d
resgen
database-permissions
datarepeater
scrollto
getusermedia
continuous-testing
caliper
point-sprites
wchar
hashalgorithm
path-manipulation
datamember
rubycas
junit3
ruby-debug
post-redirect-get
chatroom
requestfactory
jquery-ui-button
front-controller
rtsp-client
inline-if
database-diagramming
self-reference
cots

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App