I’ve spent a bit of time over the last few days re-working the Trello Dashboard, and getting used to some of the features of AngularJS. I’m happy to admit that I have a lot to learn about AngularJS, but I feel like I’m making progress!
For starters, I’ve moved all of the Trello Client interactions out of my Controller, and into a trelloLibrary module. This contains the trelloService, which can now be injected into, and used by, the Dashboard Controller, or indeed by any other AngularJS Controller. This should make the library much more portable, and has cleaned up the Controller code significantly.
Routing & Deep Linking
I’ve used the ngRoute module to enable deep-linking within the Dashboard. Selecting an Organisation and/or a Filter from the drop-down menus in the navigation bar will update the current route, allowing you to bookmark or navigate directly to a particular Organisation and Filter within the Dashboard.
Some other minor changes have also been incorporated into this version:
- Changed from the default Bootstrap theme to Flatly.
- Added the Name & Avatar for the Trello user to the Navigation Bar.