20 Nov 2016
This will be a short and sweet post. I have noticed as its one of my highest rated answers in Stack Overflow I thought I would drop the knowledge into my blog as well. If you have clean happy URLs in you angular app - and really who wouldn’t want that - you are using the $locationProvider. Then yuo have this code snipped in the config section somewhere. $locationProvider.html5Mode({ enabled:true }); But if you are missing the base tag you will get this error. Error: [$location:nobase] $location in HTML5 mode requires a <base> tag to be present! Ok no problem...
05 May 2016
Welcome to the future - enter the component method. Ok so I guess this will be logically broken up into a few sections - the component method, new life cycle event, the new component controller - the replacement for the linker function and now yes DOM manipulations in the controller. Oh boy the last one you might be thinking - but that is one of the fundamentals we learn - also a massive mistake people make either through ignorance, laziness or a combination of both. #Component Method First up the component method. I was first introduced to it though this...
29 Jun 2015
For me CSS or SCSS is a ways to a means - we need to style elements. However my pleasure on the front end come mainly from JS and the puzzles we get to solve creatively. So when I started playing around with loops and conditional statements in SCSS, I was super excited to see that SCSS can also be a fun way to solve styling issues with more traditional programming techniques. My problem to start with was creating a carrot/triangle pointing to the right. So I started to search the net and came across this cool post about using...
27 Jun 2015
This will be more or less an on going sequence of posts based on cool CSS stuff that I want to share. Also it helps me to remember how this cool stuff was done. I have been working with a CSS magician the last couple weeks, a humble one at that, and I have learned a lot of cool tricks. I want to talk about the way he made checkmarks, which blew me away. First off how you get in the mind set of thinking css can do such a thing, but I guess as with all skills it comes...
04 Oct 2014
Form validation the “Angular way” is an extremely powerful tool. We have the ability to pass a simple regular expression to the ng-pattern attribute of the input field for simple input validation, or we can make our own custom validation functions utilizing the NgModelController. So you might be thinking to yourself yeah, but I can already use a pattern for validation in html5. True, indeed you can, but when you couple all the bits and pieces together and let Angular do its thing you have a complete tool set at your disposal. In this post I wanna show how we...