Skip to content

Commit

Permalink
bug fix and identation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
newaeonweb committed May 2, 2016
1 parent c44d566 commit 0468f74
Show file tree
Hide file tree
Showing 17 changed files with 180 additions and 174 deletions.
9 changes: 5 additions & 4 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ var AngmGenerator = generators.Base.extend({
},
{
value: 'angularMaterial',
name: 'ngMaterial',
name: 'Angular Material',
checked: false
}]
}];
Expand All @@ -118,9 +118,10 @@ var AngmGenerator = generators.Base.extend({


if (this.angularBootstrap) {
this.config.set('angularBootstrap', this.angularBootstrap);
} else {
this.config.set('angularMaterial', this.angularMaterial);
this.config.set('angularBootstrap', true);
}
if (this.angularMaterial) {
this.config.set('angularMaterial', true);
}


Expand Down
8 changes: 4 additions & 4 deletions app/templates/_Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ module.exports = function (grunt) {

pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
'* <%= pkg.name %> - v<%= pkg.version %> - MIT LICENSE <%= grunt.template.today("yyyy-mm-dd") %>. \n' +
'* @author <%= pkg.author %>\n' +
'*/\n',
'* <%= pkg.name %> - v<%= pkg.version %> - MIT LICENSE <%= grunt.template.today("yyyy-mm-dd") %>. \n' +
'* @author <%= pkg.author %>\n' +
'*/\n',

clean: {
dist: ['src']
Expand Down Expand Up @@ -116,7 +116,7 @@ module.exports = function (grunt) {
'index.html': [
'bower.json',
'app/app.js',
'app/app.config.js',
'app/app.config.js',
'app/**/*Module.js',
'app/**/*Route.js',
'app/**/*Ctrl.js',
Expand Down
5 changes: 3 additions & 2 deletions app/templates/_bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
"angular-sanitize": ">=1.3.*",<% } %>
"angular-ui-router": "~0.2.10",<% if (angularBootstrap) { %>
"angular-bootstrap": "~0.14.3"<% } if (angularMaterial) { %>
"angular-material-icons": "~0.6.0",
"angular-material": ">=1.0.1"<% } %>
"angular-messages": ">=1.3.*",
"angular-material-icons": "~0.6.0",
"angular-material": ">=1.0.1"<% } %>
},
"resolutions": {
"angular": ">=1.3.*"
Expand Down
36 changes: 18 additions & 18 deletions app/templates/app/_app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
'use strict';

/**
* @ngdoc configuration file
* @name app.config:config
* @description
* # Config and run block
* Configutation of the app
*/
* @ngdoc configuration file
* @name app.config:config
* @description
* # Config and run block
* Configutation of the app
*/


angular
Expand All @@ -25,21 +25,21 @@
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';

<% if (angularMaterial) { %>
$urlRouterProvider
$urlRouterProvider
.otherwise('/dashboard');
<% } else { %>
$urlRouterProvider
.otherwise('/');
<% } %>
}
<% } else { %>
$urlRouterProvider
.otherwise('/');
<% } %>
}

runBlock.$inject = ['$rootScope'];
runBlock.$inject = ['$rootScope'];

function runBlock($rootScope) {
'use strict';
function runBlock($rootScope) {
'use strict';

console.log('AngularJS run() function...');
}
console.log('AngularJS run() function...');
}


})();
})();
17 changes: 9 additions & 8 deletions app/templates/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
'use strict';

/**
* @ngdoc index
* @name app
* @description
* # app
*
* Main module of the application.
*/
* @ngdoc index
* @name app
* @description
* # app
*
* Main module of the application.
*/

angular.module('<%= slugifiedAppName %>', [
'ngResource',
'ngAria',
<% if (angularBootstrap) { %> 'ui.bootstrap',
<% } if (angularMaterial) { %> 'ngMaterial',
'ngMdIcons',<% } %>
'ngMdIcons',
'ngMessages',<% } %>
<% if (angularCookies) { %>'ngCookies',
<% } if (angularAnimate) { %>'ngAnimate',
<% } if (angularBootstrap) { %>'ngTouch',
Expand Down
14 changes: 6 additions & 8 deletions app/templates/app/modules/home/_home-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
'use strict';

/**
* @ngdoc function
* @name app.test:homeTest
* @description
* # homeTest
* Test of the app
*/
* @ngdoc function
* @name app.test:homeTest
* @description
* # homeTest
* Test of the app
*/

describe('homeCtrl', function () {
var controller = null, $scope = null, $location;
Expand Down Expand Up @@ -36,5 +36,3 @@

});
})();


20 changes: 10 additions & 10 deletions app/templates/app/modules/home/homeCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
'use strict';

/**
* @ngdoc function
* @name app.controller:HomeCtrl
* @description
* # HomeCtrl
* Controller of the app
*/
* @ngdoc function
* @name app.controller:HomeCtrl
* @description
* # HomeCtrl
* Controller of the app
*/

angular
.module('<%= slugifiedAppName %>')
Expand All @@ -16,10 +16,10 @@
Home.$inject = ['homeService'];

/*
* recommend
* Using function declarations
* and bindable members up top.
*/
* recommend
* Using function declarations
* and bindable members up top.
*/

function Home(homeService) {
/*jshint validthis: true */
Expand Down
18 changes: 9 additions & 9 deletions app/templates/app/modules/home/homeModule.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(function() {
'use strict';
'use strict';

/**
* @ngdoc function
* @name app.module:homeModule
* @description
* # homeModule
* Module of the app
*/
/**
* @ngdoc function
* @name app.module:homeModule
* @description
* # homeModule
* Module of the app
*/

angular.module('home', []);
angular.module('home', []);
})();
14 changes: 7 additions & 7 deletions app/templates/app/modules/home/homeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
'use strict';

/**
* @ngdoc function
* @name app.service:homeService
* @description
* # homeService
* Service of the app
*/
* @ngdoc function
* @name app.service:homeService
* @description
* # homeService
* Service of the app
*/

angular.module('<%= slugifiedAppName %>')
.factory('homeService', homeService);
Expand All @@ -34,7 +34,7 @@
};

function getFeaturesList() {
return list
return list;
}

}
Expand Down
100 changes: 50 additions & 50 deletions app/templates/app/modules/layouts/main-page/mainPageCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
'use strict';

/**
* @ngdoc function
* @name app.controller:LayoutCtrl
* @description
* # LayoutCtrl
* Controller of the app
*/
* @ngdoc function
* @name app.controller:LayoutCtrl
* @description
* # LayoutCtrl
* Controller of the app
*/

angular
.module('<%= slugifiedAppName %>')
Expand All @@ -16,10 +16,10 @@
Layout.$inject = ['$mdSidenav', '$cookies', '$state', '$mdToast', '$mdDialog'];

/*
* recommend
* Using function declarations
* and bindable members up top.
*/
* recommend
* Using function declarations
* and bindable members up top.
*/

function Layout($mdSidenav, $cookies, $state, $mdToast, $mdDialog ) {
/*jshint validthis: true */
Expand All @@ -32,50 +32,50 @@
vm.changePassword = function () {
$mdToast.show(
$mdToast.simple()
.content('Password clicked!')
.position('top right')
.hideDelay(2000)
.content('Password clicked!')
.position('top right')
.hideDelay(2000)
);
};

vm.changeProfile = function (ev) {
$mdDialog.show({
controller: DialogController,
templateUrl: 'tabDialog.tmpl.html',
parent: angular.element(document.body),
targetEvent: ev,
clickOutsideToClose:true
})
.then(function(answer) {
$mdToast.show(
$mdToast.simple()
.content('You said the information was "' + answer + '".')
.position('top right')
.hideDelay(2000)
);

}, function() {
$mdToast.show(
$mdToast.simple()
.content('You cancelled the dialog.')
.position('top right')
.hideDelay(2000)
);
});

function DialogController($scope, $mdDialog) {
$scope.hide = function() {
$mdDialog.hide();
};

$scope.cancel = function() {
$mdDialog.cancel();
};

$scope.answer = function(answer) {
$mdDialog.hide(answer);
};
}
$mdDialog.show({
controller: DialogController,
templateUrl: 'tabDialog.tmpl.html',
parent: angular.element(document.body),
targetEvent: ev,
clickOutsideToClose:true
})
.then(function(answer) {
$mdToast.show(
$mdToast.simple()
.content('You said the information was "' + answer + '".')
.position('top right')
.hideDelay(2000)
);

}, function() {
$mdToast.show(
$mdToast.simple()
.content('You cancelled the dialog.')
.position('top right')
.hideDelay(2000)
);
});

function DialogController($scope, $mdDialog) {
$scope.hide = function() {
$mdDialog.hide();
};

$scope.cancel = function() {
$mdDialog.cancel();
};

$scope.answer = function(answer) {
$mdDialog.hide(answer);
};
}
};


Expand Down
Loading

0 comments on commit 0468f74

Please sign in to comment.