Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Jones ollwenjones

  • Decisions, LLC
  • Chesapeake, VA
View GitHub Profile
View Avent Ghosts 2021.md

Aden trudged up the hill into the woods. The path now rote, widened by many feet. The clearing, the empty camp, bristling with spears. Animal energy crackled inside him. He tamped it down with careful breaths. His surly servant strode impatiently ahead, leading him the door of a heavy, wrought-iron cage, it's bars pocked with rust and, in places, blood.

"Ready?"

He nodded, stepping inside. The gate swung shut with a dull clang. A heavy padlock clattered.

His mind wandered to that firebrand of a girl. Fierce hazel eyes. Hope fluttered momentarily before he lost himself as the wolf emerged.

View _ng2-translate_code-split.md

note

This was implemented back in like angular2-beta.3, and the branch has been abandoned

The gist is really doing the async loading of the other language file prior to activating the lazy-loaded route/component. At the time it was an @CanActivate annotation, but now could probably be done in a router guard.

App setup is normal https://github.com/ocombe/ng2-translate

@ollwenjones
ollwenjones / RC5_Upgrade_withDeprecs.md
Last active Aug 29, 2016
RC5 Upgrade Checklist, if we remove what is in Material 2
View RC5_Upgrade_withDeprecs.md

Todo: Update ng2-material to rc.5/6

  • Update test suite setup in platform/testing/boostrap
  • Update platform/testing/util componentSanityCheck
  • Create Ng2MaterialModule NgModule class
  • Create component NgModule classes and update tests (8 components):

| Component | NgModule class | Tests | Add to Ng2MaterialModule |

@ollwenjones
ollwenjones / RD5_Upgrade.md
Last active Aug 29, 2016
ng2-material RC5 Upgrade
View RD5_Upgrade.md

Todo: Update ng2-material to rc.5/6

  • Update test suite setup in platform/testing/boostrap
  • Update platform/testing/util componentSanityCheck
  • Create Ng2MaterialModule NgModule class
  • Create component NgModule classes and update tests (16 components):
    • backdrop
      • NgModule class
  • Tests
@ollwenjones
ollwenjones / DataTableConnundrums.md
Last active Mar 25, 2016
Angular 2 Data-Table Design Challenges
View DataTableConnundrums.md

Sorry, but it's really important for me to get this right

Apologies to those who feel I'm belaboring this point... I do so because the app I'm converting has a huge number of GWT DataGrids. If I can't DRY up the Angular 2 implementation between them I'll crash and burn. To be clear I'm discussing just the table itself not any of the associated bells and whistles. So:

I started out on an md-data-table feeling very strongly that a "component" should be compose-able, but encapsulate it's own behaviors and abstract away its implementation details. So for a DataTable I tried to encapsulate all the table mark-up, and all the 'normal' behaviors like row rendering and column sorting. (i.e. don't make me write my own ngFor to use your component, etc.)

Column headings are fairly static, and their central behavior is for sorting the content, so given a columns model interface like this

export interface MdDataTableColumn {