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#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
Generating a barrel when calling ng g component <myName>
Setting up tether-drop to work with angular-cli#1.0.0-beta.24
Angular CLI (AOT) gives error: ERROR in Cannot determine the module for class
Angular CLI - ng serve won't run unless I specify port
ERROR in Multistyles…Module not Found (Angular-cli.json)
Angular Cli support for inline templates and css
Angular Cli - How do I rebuild my project
How to change angular 2 port from 4200 to any other
Is autoprefixer active in angular-cli beta 19
How to use nconf with Angular CLI?
angular-cli how to split output js files to vendor and script js file

Categories

HOME
sql-server
cil
plsql
pug
admin-on-rest
amazon-product-api
extract
windows-store-apps
zend-framework2
mainframe
couchdb-2.0
sbt-assembly
propertygrid
proguard
slim-3
cockroachdb
jboss7.x
cortex-a
automata
spring-cloud-config
apache-karaf
pyyaml
thumbnails
cvs2svn
onsen-ui
source-maps
myob
cronet
bus-error
dhtmlx-scheduler
roundcube
apache-cloudstack
read-write
expand
geopy
rhino
color-scheme
swagger-editor
codesys
infusionsoft
soundjs
viewgroup
productivity
resuming-training
catia
filepath
chunked-encoding
xmgrace
uicollectionviewlayout
mercury
unity3d-editor
redux-router
garrys-mod
objloader
hspec
pax-web
unsatisfiedlinkerror
coordinate-transformation
financial
portfolio
web-essentials
test-class
cctray
throughput
optionbutton
unity5.3
oai
response-headers
uos
epl
sysfs
python-ggplot
alphablending
livechat
humanizer
magic-numbers
mbox
crystal-reports-10
bfd
domain-calculus
sequelpro
n-layer
pstree
isolatedstorage
flexicious
nssavepanel
cross-domain-policy
path-manipulation
text-size
qtembedded
getresource
jquery-ui-button
grooveshark
filetime
swfloader
scatterview
visual-studio-dbpro
divx

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