hmm, not sure I mean "nested". I don't want a view appearing within a page 
- I want the view to replace the current page

when I click on an item with ui-sref="NgModelDetail({id: 
NgModelDetail.ngModel.id})"

I get a 

Error: Could not resolve 'NgModelDetail' from state 'ngModelProperties'

I have the following states defined

{
      "name": "ngModelDetail",
      "url": "/ngModels/:id",
      "controller": "NgModelDetailCtrl",
      "controllerAs": "NgModelDetail",
      "templateUrl": "dyn/NgModel/html/modelDetails.html"
    },
    {
      "name": "ngModelProperties",
      "url": "/ngModels/:id/:array",
      "controller": "NgModelDetailCtrl",
      "controllerAs": "NgModelDetail",
      "templateUrl": "dyn/NgProperty/html/propertyList.html"
    }

the odd thing is that my html has

<span class="toolbar__label fs-title">Property maintenance for {{ 
NgModelDetail.ngModel.name }}</span>

and this is being rendered properly, so I know that the NgModelDetail 
controller is alive and well

On Thursday, 12 March 2015 19:33:55 UTC, Julian Lyndon-Smith wrote:

> say I have a data object like
>
> {
>   "name": "customer",
>   "schemaVersion": "00.00.00",
>   "modelType": "ngModel",
>   "subType": "text",
>   "items": [ .. ]
>   "cardInfo": {
>     "cards": [
>       {
>         "label": "Name",
>         "items": [
>         ...
>
>
> what I would like to do is edit this data by doing something similar to :
>
> name, schemaVersion, modelType and subType as input fields. Have buttons 
> for items and cardinfo. The button for cardInfo would render another form 
> with input fields for lable and a grid for items etc etc
>
> I can render the forms just fine - but I am struggling with trrying to 
> come up with the appropriate states and controllers / services
>
> should I have a state & controller for schemaVersion, modelType and 
> subType, and a seperate state / controller for each array within this data 
> object ? If so, should the state be sub-views of a main view ? and what 
> should the urls look like ?
>
> thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to