Local storage is accessed through window.localStorage object
Use
localStorage.setItem(key, value) to set the item in local storage
localStorage.getItem(key) to retrieve the value from the item in local storage
localStorage.clear() to erase everything in localStorage
localStorage.removeItem(key) in order to erase the specific key from the local storage
When trying to save object literals arrays use JSON.stringify(), JSON.parse
Use storage event to determine if change has happed on the local storage and StorageEvent object. Not working in all browsers.
Node, Express, Gulp, BrowserSync, HTML For web designers. When html or css file in client folder is changed automatically refreshes targeted browsers.
Must have node, npm, gulp, typings installed
Install node dependencies in your project root directory (this is where the 'package.json' file is located) using:
$ npm install
Install typescript definitions using:
$ typings init
$ typings install
Start application with
$ gulp
Application will be initialy compiled and started. By default the server is listening on port 3036. Browser synchronization is configured in proxy mode. Client application (Angular2) can be accessed through your web browser on the following url localhost:3033/www. If everything is ok you should see the rendered HTML file client/index.html in your browser.
You can configure targeted browsers for synchronization in gulpfile.js
gulp.task('configure_browser-sync', function(){
return browserSync.init(
{
browser: ["chrome", "firefox", "opera"],
proxy: "http://localhost:3033/www"
}
);
});