Reputation: 1279
My $state.go
:
this.$state.go(transfer.project, params)
where prams is an object that contains a large project
object and projectId
property number type.
The state :
.state({
name: 'transfer.project',
url: '/{projectId:int}',
params: {
project: null
},
component: 'projectTransfer'
})
And I recover the object in my component with:
this.project = this.$state.params.project
is it a good practice to spend a large object in params ? Or if you know where is the source code that this in ui-route library
Upvotes: 1
Views: 205
Reputation: 5176
The object is only being passed by reference, so all that's really happening is an additional pointer is being created to it. Resource usage would be very minimal.
Upvotes: 2