This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { autoinject } from "aurelia-dependency-injection"; | |
import { Router } from "aurelia-router"; | |
import { ObserverLocator } from "aurelia-binding"; | |
declare var $: any; | |
@autoinject() | |
export class ModalService { | |
constructor( private router: Router, private observerLocator: ObserverLocator ) { | |
this.observeRouterNavigation(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class WindowCloseNotifierHelper { | |
public static setMessage( message: any ) { | |
if ( message && _.isFunction(message) ) { | |
window.onbeforeunload = message; | |
} else if ( message ) { | |
window.onbeforeunload = ( e: any ) => { | |
if ( e ) { | |
e.returnValue = message; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class StringifyValueConverter { | |
public toView( value: any ): string { | |
if ( value ) { | |
return JSON.stringify(value); | |
} else { | |
return "null object"; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CloneUtility } from "./clone"; | |
import { Disposable } from "aurelia-binding"; | |
import { BindingEngine } from "aurelia-binding"; | |
/** | |
* Unit Of Work Observer | |
* Based on the work of fragsalat's MultiObserver found at | |
* https://gist.github.com/fragsalat/819a58021fc7b76a2704 | |
* | |
* | |
* The purpose of this observer is to observe all changes made to a model and allows you |
NewerOlder