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
{ | |
... | |
"scripts": { | |
"lint": "ng lint --type-check", | |
... | |
}, | |
"pre-commit": [ | |
"lint" | |
], | |
... |
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 const routes: Routes = []; | |
@NgModule({}) | |
export class AppRoutesModule {} |
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
b64toFile(dataURI): File { | |
// convert the data URL to a byte string | |
const byteString = atob(dataURI.split(',')[1]); | |
// pull out the mime type from the data URL | |
const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] | |
// Convert to byte array | |
const ab = new ArrayBuffer(byteString.length); | |
const ia = new Uint8Array(ab); |
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
const testScheduler = new TestScheduler(); | |
const hotObservable = testScheduler.createHotObservable(hotMarbleString); | |
const coldObservable = testScheduler.createColdObservable(coldMarbleString); |
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
app/ | |
+-store/ | |
+-route1/ | |
+-sub-reducer1/ | |
--sub-reducer1.actions.ts | |
--sub-reducer1.effects.ts | |
--sub-reducer1.model.ts | |
--sub-reducer1.reducer.ts | |
+-sub-reducer2/ | |
--route1.actions.ts |
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
// standard imports omitted for clarity | |
import {AppStores} from './app.stores'; | |
import { AppComponent } from './app.component'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ |
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
<ng-template #dynamicInsert></ng-template> |
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
this.form.patchValue({ | |
name: contact.name, | |
sex:contact.sex, | |
dob:contact.dob.toLocaleDateString() | |
}); |
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
Object.defineProperty(XMLHttpRequest.prototype, 'onreadystatechange', { | |
enumerable: true, | |
configurable: true, | |
get: function() { | |
return this.orsc; | |
}, | |
set: function(f) { | |
this.orsc = f; | |
} | |
}); |
NewerOlder