McNull / angular-form-gen

Design Bootstrap based form schemas for AngularJS in a drag and drop WYSIWYG environment.
MIT License
135 stars 81 forks source link

Creating dynamic user created tabs with the use of ng-repeat #25

Closed YussufElarif closed 7 years ago

YussufElarif commented 8 years ago

I'm using this angular extension module to allow users to add tabs, delete tabs and modify tab titles which where the problem relies to create something like a form wizard creation tool. Using ng-repeat and tracking an object by $index would properly apply the location of tabs in order, however, the title of the tab does not change but retrieves the name of the last indexed object property name.

The tabs start like this:

example 1

When pressing add new tab, this goes to a function and applies a new object to the array but the name does not change:

example 2 example 3

The section of the html file:

<div ng-repeat="schema in myForm.schema track by $index"> <div fg-tabs-pane="{{schema.name}}">

the ng-repeat picks up the new object from the scope as it has been changed and correctly applies the new tab, however, the name change does not seem to apply when inputting the object name within the fg-tabs-pane.

mmaask commented 8 years ago

Set a watcher on the object name?