mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
ui-router support mock-clicks/events with no data, fixes #406
This commit is contained in:
5
dist/js/angular-ui/angular-ui-router.js
vendored
5
dist/js/angular-ui/angular-ui-router.js
vendored
@@ -1,6 +1,7 @@
|
||||
/**
|
||||
* State-based routing for AngularJS
|
||||
* @version v0.2.8
|
||||
* @version v0.2.8, with commit:
|
||||
* https://github.com/angular-ui/ui-router/commit/717d3ff7d0ba72d239892dee562b401cdf90e418#diff-544b7ce9751e1a566e17d486dd4ab576
|
||||
* @link http://angular-ui.github.com/
|
||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
@@ -2394,7 +2395,7 @@ function $StateRefDirective($state, $timeout) {
|
||||
|
||||
element.bind("click", function(e) {
|
||||
var button = e.which || e.button;
|
||||
if ((button === 0 || button == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey && !element.attr('target')) {
|
||||
if ( !(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || element.attr('target')) ) {
|
||||
// HACK: This is to allow ng-clicks to be processed before the transition is initiated:
|
||||
$timeout(function() {
|
||||
$state.go(ref.state, params, { relative: base });
|
||||
|
||||
43
dist/js/angular-ui/angular-ui-router.min.js
vendored
43
dist/js/angular-ui/angular-ui-router.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user