We're almost there. We just need to add some styles, edit a couple of files with minor adjustments, and we'll be done!
If you were to run the app now, it would work, but you wouldn't actually be able to create image notes, which defeats the purpose of what we've done so far. The reason the app fails is because we haven't updated our factories or our note list view.
In www/js/app/factories/noteFactory.js
, we update the factory so that it can return an image note and an appropriate filename. Use the following code to update the factory:
define ( ["app/models/baseNote", "app/models/audioNote","app/models/imageNote"], function ( BaseNote, AudioNote, ImageNote ) { noteFactory.createNote = function ( noteType ) { … case noteFactory.IMAGENOTE: return new ImageNote(); … } noteFactory.createAssociatedMediaFileName = function (noteType, uid) { … case noteFactory.IMAGENOTE: extension = {...