This is a continuation of the World's Simplest AngularJS Example in Visual Studio post. This post adds simple data binding to the example. Most .NET developers understand data binding from Windows Forms, Web Forms, or XAML. For example, in Windows Forms you can bind a LastNameTextbox control's Text property to a LastName property of a Customer class (or LastName field in a data source). When the form displays, the Textbox is automatically populated. If the user changes the contents of the Textbox, the property (or field) is automatically updated. Angular provides this same
type of two-way data binding. It automatically synchronizes HTML elements with data properties. The key to data binding with Angular is the ng-Model directive. The ng-Model directive binds HTML elements to a property. If no property exists, the property will be created implicitly. We'll use that default functionality to perform data binding without any real properties for this simple example. Let's try some very simple data binding:
Originally posted on: http://geekswithblogs.net/michelotti/archive/2014/03/03/caparea-ndash-durandal-vs.-angular-code-samples.aspxThanks to everyone for attending my presentation last week on DurandalJS vs. AngularJS at CapArea. The code samples and PowerPoint from my presentation can be found here.
A new Android SDK for Office 365 is also revealed.
Microsoft's renamed cloud storage for business offering, OneDrive for Business, will be available for purchase starting April 1 and available as a standalone offering for the first time.
by Chris Martin - (bluechrism) So this isn't a major problem, but in an app like Shoppers Calculator, there are various places where numbers get entered, and a lot of repeat code to validate entry, or limit the user to a certain number of decimal places, or even just to stop them pressing the decimal key twice. It makes sense, therefore, to wrap all that up into a re-usable control. So here's what it ought to do: Force the number keypad Ensure that only one decimal place can be
entered Allow the developer to restrict the length or the number, Check that if you try to paste text in that's not a number, it doesn't allow it. You can get the source code and a dll containing the control from here. Compatibility is with both Windows Phone 7 and Windows Phone 8. So getting started then, we don't want to create this from scratch so add a new class, name it and have it inherit from System.Windows.Controls.TextBox. In the constructor, we will...(Read whole news on source site)
In the previous post we added unit tests for the AngularJS code running on the client. And while these tests are important there is more to test. After all the client side code depends on a server side WebAPI controller and a RavenDB database. In this post we are going to add unit tests for those two. To inject or not to inject dependencies Normally when one class depends on another it is best to use dependency injection to get one to use another. And the dependency is then based around interfaces so
a dependency can be faked during testing. The MoviesController is the WebAPI controller that publishes our movies. This results in it having a dependency on the RavenDB IDocumentStore. Now we could create a fake IDocumentStore implementation but the recommendation from Ayende Rahien with RavenDB is not to do so and user the real thing with an in memory database. And because we are already using the EmbeddableDocumentStore that loads its connection info from the application configuration file all we need to do is specify the appropriate connection string for our unit tests.