AngularJS, the Digest Loop, Directives and jQuery

I've been struggling with understanding when and how to use jQuery inside an AngularJS directive and have the data binding work as expected.  I've got a good example I put together that shows how to do this as well as shows when you need to use the scope.$apply().  As a developer who spends a lot of time working with Microsoft technology, it's become very clear to me that I need to know a lot about AngularJS. AngularJS is a technology that Microsoft (Visual Studio) is pushing as a defacto standard and I'm sure they will have a lot of offerings that either use Angular or are inspired by it. You can see from the below example that in the directive, I am using AngularJS.  Because our DOM is being modified outside of what AngularJS can see, … Continue Reading

In Microsoft’s Visual Studio Editor Search Without Hurting Paste Buffer

I know this seems kind of trivial but I just accidentally discovered a feature in Visual Studio that probably all in all has cost me many many lost seconds of productivity.  I often find myself in visual studio with something in my paste buffer but want to search for something else in code. I know this sounds a little obtuse but if you know what I’m talking about and you don’t do it yourself, this will save you a bunch of time. I’m in  them middle of full speed prep for Silicon Valley Code Camp (which is what this program I am using for the example below is) as well as working on my next Sencha ExtJS 5 upgrade Plurasight video so I have my tools all cranked up. I thought I’d quickly share a video of what I’m talking about. Here you … Continue Reading

ExtJS 5 Bind ViewModel To Template

The simplest things can often be aggravating to get right.  I often find that when something does not work (especially in ExtJS 5 using View Model and Bind) that I need to make the simplest example to prove my understanding to myself.  I thought I would share a very simple yet powerful example of how to bind data from a ViewModel to an xtemplate in ExtJS 5. There are many other things you can do with databinding including modeling selected row in a grid as well as nice integration with formulas.  The below example is just a very simple case that proves it works which is often all I need. Notice that in the code below I’ve created a very simple viewport with just one item.  The two big takeaways are: The data must be … Continue Reading

Common Pattern in ASP.NET Razor For Clean cshtml Pages

I’ve been doing a lot of work over the past year in Microsoft’s ASP.NET Razor.  I’m not an html wizard and definitely a razor syntax wizard, but I have figured out a way that saves me time over and over.  It’s basically the same pattern of thinking that has me often do things in 2 or 3 steps instead of one just to make sure the logic is overly clear. In this case, I often find myself trying to create complex Razor syntax to output data.  That is, say I want to output a link that combines a static URL with a dynamic one coming from a model.  My first work is almost always trying to do it all at once and I’m guessing at least someone is going to tell me how I could have done.  That is, I want something like (in non-working … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: