Category Archives: Javascript

Angular JS Routing Interception and Redirection Failure

Mike BerrymanRecently I had built an Angular JS application that would prompt the user for some information in a popup whenever they tried to navigate to a specific route, before that route’s page actually shows to the user.  If the user provided some invalid data or they cancelled/closed the popup I needed the app to either a) take the user back to the route they were on or b) redirect to the home page of the app if they weren’t coming from a route within the app.

Read more

Decorators in TypeScript

3Decorators are an experimental feature of TypeScript and, to an extent, of JavaScript itself. They are a concept borrowed from Python, and a way to modify classes using higher order functionality.

The idea is that you pass the class/function/attribute through a function and the result becomes the class/function/attribute.

As an example, if you make a @final decorator and have the code…

Read more

« Older Entries Recent Entries »