Skip to content

Use Deep merge rather then extend when Inheriting Data Properties on Nested views #3045

Closed
@martyzz1

Description

@martyzz1
// inherit 'data' from parent and override by own values (if any)
      data: function(state) {
        if (state.parent && state.parent.data) {
          state.data = state.self.data = angular.merge(state.parent.data, state.data);
        }
        return state.data;
      },

This seems to work for me ok, would really help when using Data to provide configurable properties for things like Meta data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions