Friday 23 December 2016

AngularJS style switcher

It's often the case that you want to provide more than one CSS stylesheet for your app or website. You can do this by including a style switching function in your app. Here's how to do it in AngularJS.

Monday 19 December 2016

Useful websites for developers

There are some amazing learning resources on the web, in every area of development, design, mobile, responsive, UX, and more. Here are some of my favourites.

Friday 16 December 2016

Useful tools for developers

There are some amazing tools available for developers on the web, from pretty-printing your code to validating it, from colour palettes for visual impairments to tools for testing APIs. Here are some of my favourites.

Tuesday 13 December 2016

Curvy wrapping with CSS Shapes

I thought it was pretty impressive when CSS styles were developed that let you make a shape or a photo with curves on the corners, or a circle.

Eric Meyer discusses how to implement and use CSS Shapes in a responsive layout over at A List Apart, in an article entitled A Redesign with CSS Shapes.

Now there's a feature that lets you wrap the text around your circular object. It's called CSS Shapes. At the moment it is only supported by WebKit browsers, but you can still display your text using old-style wrapping in non-WebKit browsers.



Monday 12 December 2016

Inclusive Design

The season of advent is well underway over at 24 ways, with a daily article on an aspect of web development. One title that leaped out at me was What the heck is Inclusive Design? by Heydon Pickering, who is the accessibility editor for Smashing Magazine and works with The Paciello Group as an accessibility and UX consultant. He is the author of a book on Inclusive Design Patterns which should probably be on your wish list.

How to embed a Google Doc in Blogger

So you have a Google document that you want to display on your Blogger blog or website.

It's actually fairly simple to embed Google Documents in a Blogger blogpost or page.

Friday 9 December 2016

How to embed a Google Presentation in Blogger

So you have a Google presentation that you want to display on your Blogger blog or website.

It's actually fairly simple to embed Google Slides in a Blogger blogpost or page.

Wednesday 7 December 2016

Using FontAwesome in Moodle

FontAwesome is a nifty icon set that you can use anywhere that you can edit HTML.

For example, you can use it in Moodle to display a symbol.

Tuesday 6 December 2016

Submit a post request from an Angular modal and refresh the main page

I have a main controller with some data (fetched by $http.get), and when you click on one item, it pops up a modal with more details.

In my modal, there is a button to modify the data (sent by $http.post) which then closes the modal and needs to tell the parent controller to refresh the data, because it has been modified by the event in the modal.

Monday 5 December 2016

Getting multiple Angular modals to work with http response data

Your app will undoubtedly have more than one modal (pop-up div), and it can be hard to see how to get more than one of them working in Angular. Here's a step-by-step guide to how to do it.

Friday 2 December 2016

Angular with a Moodle webservice

Getting Angular to work with a Moodle webservice

I am building an application to get Json data from a Moodle web service, and using AngularJs to display the data in the app. There are multiple functions on the Moodle webservice, so I need multiple controllers in the Angular app.

I am using Visual Studio and Cordova to write the app.

I have come up with a solution for getting the token from Moodle, storing it using jstorage, and displaying it on the various panes of the single-page mobile app.

Thursday 1 December 2016

Authenticate with Moodle from a mobile app


My mobile app needs to log in to Moodle to get Json data from a webservice and display it using Angular.

In order to do that, I need to pass in a username and password and get a Moodle webservice token back, so my app doesn't need to log in again (at least until the token expires).