mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(build): make watch task build all before watch starts
This commit is contained in:
@@ -60,7 +60,7 @@ gulp.task('docs', function(done) {
|
||||
});
|
||||
|
||||
var IS_WATCH = false;
|
||||
gulp.task('watch', ['bundle'], function() {
|
||||
gulp.task('watch', ['build'], function() {
|
||||
IS_WATCH = true;
|
||||
gulp.watch('js/**/*.js', ['bundle']);
|
||||
gulp.watch('scss/**/*.scss', ['sass']);
|
||||
@@ -200,7 +200,7 @@ gulp.task('tweet', function() {
|
||||
console.log(tweet);
|
||||
return gulp.src('package.json')
|
||||
.pipe(twitter(oauth, tweet));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
gulp.task('docs-index', function() {
|
||||
|
||||
15
js/ext/angular/src/directive/ionicTabBar.js
vendored
15
js/ext/angular/src/directive/ionicTabBar.js
vendored
@@ -286,8 +286,8 @@ function($scope, $ionicViewService, $rootScope, $element) {
|
||||
* @param {expression=} on-deselect Called when this tab is deselected.
|
||||
* @param {expression=} ng-click By default, the tab will be selected on click. If ngClick is set, it will not. You can explicitly switch tabs using {@link ionic.service:$ionicTabsDelegate#select $ionicTabsDelegate.select()}.
|
||||
*/
|
||||
.directive('ionTab', ['$rootScope', '$animate', '$ionicBind', '$compile', '$ionicViewService',
|
||||
function($rootScope, $animate, $ionicBind, $compile, $ionicViewService) {
|
||||
.directive('ionTab', ['$rootScope', '$animate', '$ionicBind', '$compile', '$ionicViewService', '$state', '$location',
|
||||
function($rootScope, $animate, $ionicBind, $compile, $ionicViewService, $state, $location) {
|
||||
|
||||
//Returns ' key="value"' if value exists
|
||||
function attrStr(k,v) {
|
||||
@@ -372,9 +372,14 @@ function($rootScope, $animate, $ionicBind, $compile, $ionicViewService) {
|
||||
});
|
||||
|
||||
function selectTabIfMatchesState() {
|
||||
// this tab's ui-view is the current one, go to it!
|
||||
if ($ionicViewService.isCurrentStateNavView($scope.navViewName)) {
|
||||
tabsCtrl.select($scope);
|
||||
var href = $attr.href.replace(/^#/, '');
|
||||
var stateName = $attr.uiSref.split('(')[0];
|
||||
|
||||
if ($location.path().indexOf(href) === 0 || $state.includes(stateName)) {
|
||||
// this tab's ui-view is the current one, go to it!
|
||||
if ($ionicViewService.isCurrentStateNavView($scope.navViewName)) {
|
||||
tabsCtrl.select($scope);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user