Skip to content

Latest commit

 

History

History
210 lines (160 loc) · 4.44 KB

CHANGELOG.md

File metadata and controls

210 lines (160 loc) · 4.44 KB

v1.8.0

Features

  • Decorators: The decorators now handle a default value #43
  • Example:

    • Before:
      	import {LocalStorage} from 'ng2-webstorage';
    
      	@Component({...})
      	class FooComponent implements OnInit {
      		@LocalStorage('foobar') foobar; 
      
      		ngOnInit() {
      			let storedValue = this.storage.retrieve('foobar');
      			if(!storedValue) this.foobar = 'default value';
      		}
      	}
    • After:
      	import {LocalStorage} from 'ng2-webstorage';
    
      	@Component({...})
      	class FooComponent implements OnInit {
      		@LocalStorage('foobar', 'default value') foobar; 
      	}

v1.7.0

Features

  • Options: The library offers a new options caseSensitive #42
  • Example:

    • Before:
      	import {Ng2Webstorage, LocalStorage} from 'ng2-webstorage';
    
      	@NgModule({
      		imports: [
      			Ng2Webstorage.forRoot({
      				caseSensitive: true
      			})
      		],
      	})
      	export class AppModule {}
    
      	@Component({...})
      	class FooComponent {
      		@LocalStorage('foobar') foobar; 
      		@LocalStorage('Foobar') Foobar; 
      		// Before 1.7 the two binding above had the same value
      	}
    • After:
      	import {Ng2Webstorage, LocalStorage} from 'ng2-webstorage';
    
      	@NgModule({
      		imports: [
      			Ng2Webstorage.forRoot({
      				caseSensitive: true
      			})
      		],
      	})
      	export class AppModule {}
    
      	@Component({...})
      	class FooComponent {
      		@LocalStorage('foobar') foobar = 2; 
      		@LocalStorage('Foobar') Foobar = 3;
      
       		show() {
      			console.log(this.foobar); // 2		
      			console.log(this.Foobar); // 3
      		} 
      	}

v1.6.0

Features

  • ANGULAR 4 Compliant: The library is now compliant with the ng4 compiler #23

PEER-DEPENDENCY UPDATES

  • angular: @angular/...4.0.1

v1.5.0

Deprecation

  • AoT compilation: Fixed forRoot method to be compliant with AoT compilations
  • Example:

    • Before:
      	import {Ng2Webstorage, configure as WebstorageConfigure} from 'ng2-webstorage';
    
      	WebstorageConfigure({
      		separator: '.',
      		prefix: 'custom'
      	});
      	
      	@NgModule({
      		imports: [Ng2Webstorage],
      	})
      	export class AppModule {}
    • After:
      	import {Ng2Webstorage} from 'ng2-webstorage';
    
      	@NgModule({
      		imports: [
      			Ng2Webstorage.forRoot({
      				separator: '.',
      				prefix: 'custom'
      			})
      		],
      	})
      	export class AppModule {}

v1.4.3

Features

  • AoT compilation: Add configure method replacing the forRoot one for the AoT compilations #27
  • Example:
    • Before:
      	import {Ng2Webstorage} from 'ng2-webstorage';
    
      	@NgModule({
      		imports: [
      			Ng2Webstorage.forRoot({
      				separator: '.',
      				prefix: 'custom'
      			})
      		],
      	})
      	export class AppModule {}
    • After:
      	import {Ng2Webstorage, configure as WebstorageConfigure} from 'ng2-webstorage';
    
      	WebstorageConfigure({
      		separator: '.',
      		prefix: 'custom'
      	});
      	
      	@NgModule({
      		imports: [Ng2Webstorage],
      	})
      	export class AppModule {}

PEER-DEPENDENCY UPDATES

  • angular: @angular/...2.4.1

v1.4.2

Fix

v1.4.0

Features

  • listener: Now listen the changes made from other windows (Localstorage only) and devtool panel #23

PEER-DEPENDENCY UPDATES

  • angular: @angular/...2.2.0

BREAKING CHANGES

  • KeyStorageHelper: - This service is not exposed anymore. Use the module's method forRoot instead to configure the web storage options.
  • Example:
    • Before:
      	KeyStorageHelper.setStorageKeyPrefix('custom');
      	KeyStorageHelper.setStorageKeySeparator('.');
    • After:
      	@NgModule({
      		imports: [
      			Ng2Webstorage.forRoot({
      				separator: '.',
      				prefix: 'custom'
      			})
      		]
      	})
      	class AppModule {}