projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
644737f
)
CRM-14798 - crmUi - Add "goto()" helper function
author
Tim Otten
<totten@civicrm.org>
Tue, 1 Jul 2014 00:19:20 +0000
(17:19 -0700)
committer
Tim Otten
<totten@civicrm.org>
Tue, 1 Jul 2014 00:19:20 +0000
(17:19 -0700)
Example: <button ng-click="goto('home')">Go home!</button>
This allows us to use buttons instead of <A HREF>'s -- which makes it easier
to maintain consistent styling in a button bar.
js/angular-crm-ui.js
patch
|
blob
|
blame
|
history
diff --git
a/js/angular-crm-ui.js
b/js/angular-crm-ui.js
index 021550d5dac3b2cf7f140489d33b2f5ba7a8161b..52c02a2739d3daab266396f85ab126596ec862e1 100644
(file)
--- a/
js/angular-crm-ui.js
+++ b/
js/angular-crm-ui.js
@@
-64,6
+64,12
@@
}
};
})
+ .run(function($rootScope, $location) {
+ /// Example: <button ng-click="goto('home')">Go home!</button>
+ $rootScope.goto = function(path) {
+ $location.path(path);
+ };
+ })
;
})(angular, CRM.$, CRM._);
\ No newline at end of file