Welcome to the future where web page elements are finally packaged as separate, reusable components.
New framework from Google makes it easier to create UI for applications on the desktop, web, and mobile devices.
Alen Siljak's blog. Interesting links, articles, and thoughts...
Welcome to the future where web page elements are finally packaged as separate, reusable components.
New framework from Google makes it easier to create UI for applications on the desktop, web, and mobile devices.
Another excellent tip on linking jQuery and Angular. If you are using various jQuery plugins (like datetimepicker) for the looks, it turns out they don't work with AngularJS bindings out of the box. Fortunately, the link is very simple.
Previously, I've written on how to access the full scope.
Here, I'll describe how to link Bootstrap DateTimePicker to AngularJS model. The documentation for the datetimepicker lists the event and handling of the events. The underlying date used by the picker is a Moment, so to get a formatted string, use .format() on the date property.
One way, but a difficult one, would be to do something along the lines of:
$('.datetimepicker').datetimepicker(customDateTimePickerOptions)
.on('dp.change', function(event) {
var jElement = $(event.currentTarget);
var element = angular.element(jElement);
var controller = element.controller();
var scope = element.scope();
scope.$apply(function() {
scope.model.parameters.validFrom = event.date.format();
});
});
However, there we don't know which value to update. The fix, fortunately, is extremely simple:
$('.datetimepicker').datetimepicker(customDateTimePickerOptions)
.on('dp.change', function(event) {
var div = $(event.currentTarget);
var input = div.find('input');
input.trigger('input');
});
All that is required, actually, is to fire an 'input' event because this is what AngularJS expects. That way, you can simply use ng-model to bind the value of the input to the Angular model in HTML.
Source: StackOverflow, as usual.
Another bridge to cross. There are multiple ways to do use the unobtrusive client-side validation with Aps.Net MVC (this is jQuery validation) but style it with Bootstrap, but the most elegant solution is in the article below:
ASP.Net MVC 5 – quick tip for unobtrusive validation and Bootstrap styling | danielwertheim
Daniel creates a (relatively) simple jQuery extension which does all the work in the background. All that remains is to add it to one of the script bundles. Thanks!
Apart from the angular js adapter for DataTables, there is a "native" angular js data grid project - ng-grid. There is a plunker that shows how it works with Bootstrap styling.
As of version 3.0, the project is called ui-grid.
Below are the links to the main site, documentation, download, etc.
ASP.Net (MVC) is moving towards claims-based authentication system. Here's some background reading.