Hi Jay,
You can store your 'viewed' array in an service, and inject that in both
controllers. Then you can mark a record viewed from both places, and it
will persist.
something like this:
angular
.module('sample',[])
.controller("one", one)
.controller("two", two)
.service("common", common)
one.$inject=["common"]
function one(common) {
var vm = this;
vm.selected = common.selected;
}
two.$inject=["common"]
function two(common) {
var vm = this;
vm.selected = common.selected;
}
function common() {
this.selected = [];
}
the common.selected will be the same, everywhere in your application!
Regards
Sander
--
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.