How to Use <select> in AngularJS

While working on one of the projects, I had a form with a <select> element with <option> elements fetched from a RESTful API. To achieve that, you can use a ngRepeat directive, but there is a better alternative. For <select> tags, AngularJS has a ngOptions directive. An example of a <select> tag filled in with <option> tags from items model:

Author's profile picture Łukasz Kliś on angularjs, ngoptions, and ngrepeat

Dialog Directive in Angular UI

For a couple of months I've been working on a project where we've been using AngularJS. Community is not as big as Backbone.js’s, but it's growing day by day, and more and more developers are using it. We wanted to use something like jQuery UI to handle all dialogs, accordions, etc. We found out, that there is an alternative written in pure AngularJS by its team members, so we've decided to give it a try. Angular UI has many "modules". One of them is UI-Bootstrap, which provides all necessary elements for our project. Yes, as the name may suggest, it's Twitter's Bootstrap written in AngularJS. When developing one of the modules, I had to use $dialog directive. For the sake of clean code and good project's structure, we keep each of the templates in HTML files. I wrote a simple function to open a dialog modal using an external template handled by controller DialogCtrl.

Author's profile picture Łukasz Kliś on angularjs, angularui, and $dialogprovider