Navigation
CATEGORY: Angular

Dynamically Bound Inputs with Angular

As I continue to learn angular, I have found myself moving towards more abstract/dynamic programming with javascript. That is, relying on a languages features to alter the functionality of piece of code through data. Recently I’ve discovered the need for dynamically bound inputs – or input fields that bind to a scope during runtime and are unknown at “compile” time. The following provides a basic approach towards that end.

First, some basic data testing. Our $scope will contain a model for us to bind to, and we’ll display the values with some simple HTML.

<div class="message">
    <h1>Title: {{ entity.title }} </h1>
    <pre>{{ entity.description }}</pre>
</div>
There are no more results.