Working on an Angularjs project is new to me. My project uses Django, a Python web framework and Angularjs, which if you hadn’t guessed it is a Javascript framework. For my part in the project I rarely work with Django, but I’ve definitely been working with Angular.
For the most part Angular allows anything you want to be coded into Javascript and appear in HTML. The project that I am working on already has Angular fully setup for multiple pages and different controllers which govern the Javascript for those pages. The state of the controller is supposed to take precedence from the any other state, for instance other controllers. I have to create and implement a modal (popup page on top of the current page) and since modals have their own controllers I cannot use any of the variables from the previous controller (the controller for the page) directly, I have to send them to the modal’s controller first. However, there are differences with using state variables from a modal verses from a normal page. The HTML document is only loosely associated with the modal even though it should be completely controlled by the controller.
Angular is great, but for bugs like this I had to use a workaround. Since some angular directives (HTML attributes which access Javascript) didn’t work with the modal I decided to use one that did. The only downside–which could be beneficial in the long run–is that the directive injects an entire block of HTML into the document instead of changing a simple src attribute. This does allow for any and all attributes of the HTML block to be controlled by Javascript. However, I still consider it a workaround as this method will almost surely slow down the rendering speed.
Currently I am focusing on the practical elements of the code, leaving the aesthetic and edge-case problems for the next sprint. So far, I have enjoyed working with Angular and the small amount of Django which I’ve coded. It is fun working on an establish project. I hope you will understand that some of my descriptions are very indirect, and the reason there are no images is because I am under an NDA. This is still an honest description of my work, but until everything is set in stone I would rather not leak anything on accident.