Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
When a certain operation occurs page, another page for another operation.
A page may occur when certain operations, recorded in a Session tag, this tag to another page monitoring perform another operation.
A Page Setup Session
$cookies.set("标记库", "标记1");
$cookies.set("标记库", "标记2");
Another page identification mark, and accordingly the operation
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
var result = $cookies.get("标记库");
if (result == "标记1") {
//要进行的动作1
$cookies.remove("标记库");
}
if (result == "标记2") {
//要进行的动作2·
$cookies.remove("标记库");
}
})