|
| 1 | +<templateSetgroup="angular-esis"> |
| 2 | + <templatename="ngCtrl"value="(function() { /* @ngInject */ function $ControllerName$Config($stateProvider) { var section = { name: 'app.$state$', url: '$url$/', // abstract: true, data: {}, views: { '$VIEW$@': { // controllerAs: '', templateUrl: '/partials/$END$/$ControllerName$.html', controller: '$ControllerName$Ctrl' } } }; $stateProvider .state(section); } /* @ngInject */ function $ControllerName$Ctrl() { // var vm = this; } angular .module('$APP$') .config($ControllerName$Config) .controller('$ControllerName$Ctrl', $ControllerName$Ctrl) ; }).call(this); "description="Define a new Angular Controller."toReformat="false"toShortenFQNames="true"> |
| 3 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 4 | + <variablename="ControllerName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 5 | + <variablename="state"expression=""defaultValue=""alwaysStopAt="true" /> |
| 6 | + <variablename="url"expression=""defaultValue=""alwaysStopAt="true" /> |
| 7 | + <variablename="VIEW"expression=""defaultValue="'main'"alwaysStopAt="true" /> |
| 8 | + <context> |
| 9 | + <optionname="HTML_TEXT"value="false" /> |
| 10 | + <optionname="HTML"value="false" /> |
| 11 | + <optionname="XSL_TEXT"value="false" /> |
| 12 | + <optionname="XML"value="false" /> |
| 13 | + <optionname="JSP"value="false" /> |
| 14 | + <optionname="CSS_PROPERTY_VALUE"value="false" /> |
| 15 | + <optionname="CSS_DECLARATION_BLOCK"value="false" /> |
| 16 | + <optionname="CSS_RULESET_LIST"value="false" /> |
| 17 | + <optionname="CSS"value="false" /> |
| 18 | + <optionname="JS_STATEMENT"value="true" /> |
| 19 | + <optionname="HAML"value="false" /> |
| 20 | + <optionname="OTHER"value="false" /> |
| 21 | + </context> |
| 22 | + </template> |
| 23 | + <templatename="ngProv"value="(function() { /* @ngInject */ function $ProviderName$ProviderFactory() { var self = this; self.$get = function $ServiceName$Factory() { return { $END$ }; }; } angular .module('$APP$') .provider('$ProviderName$', $ProviderName$ProviderFactory) ; }).call(this);"description="Define a new Angular Provider."toReformat="false"toShortenFQNames="true"> |
| 24 | + <variablename="APP"expression=""defaultValue="myApp"alwaysStopAt="true" /> |
| 25 | + <variablename="ProviderName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 26 | + <variablename="ServiceName"expression=""defaultValue="ProviderName"alwaysStopAt="true" /> |
| 27 | + <context> |
| 28 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 29 | + <optionname="JS_EXPRESSION"value="true" /> |
| 30 | + <optionname="JS_STATEMENT"value="true" /> |
| 31 | + </context> |
| 32 | + </template> |
| 33 | + <templatename="ngMod"value="(function() { /* @ngInject */ function $ConfigName$Config() { } /* @ngInject */ function $ConfigName$Run($rootScope) { } var dependencies = [ $END$ ]; // var applicationConfigConstant = window["$ConstantName$"] || {}; angular .module('$APP$', dependencies) // .constant('$ConstantName$', applicationConfigConstant) .config($ConfigName$Config) .run($ConfigName$Run) ; }).call(this); "description="Define a new Angular Module."toReformat="false"toShortenFQNames="true"> |
| 34 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 35 | + <variablename="ConfigName"expression="firstWord()"defaultValue="APP"alwaysStopAt="true" /> |
| 36 | + <variablename="ConstantName"expression="firstWord()"defaultValue="APP"alwaysStopAt="true" /> |
| 37 | + <context> |
| 38 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 39 | + <optionname="JS_EXPRESSION"value="true" /> |
| 40 | + <optionname="JS_STATEMENT"value="true" /> |
| 41 | + </context> |
| 42 | + </template> |
| 43 | + <templatename="ngDir"value="(function() { /* @ngInject */ function $DirectiveName$DirectiveFactory() { return { restrict: 'EA', templateUrl: '/partials/$END$/$DirectiveName$Directive.html', link: function $DirectiveName$PostLink(iScope, iElement, iAttrs) { } }; } angular .module('$APP$') .directive('$directive$', $DirectiveName$DirectiveFactory) ; }).call(this);"description="Define a new Angular Directive"toReformat="false"toShortenFQNames="true"> |
| 44 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 45 | + <variablename="DirectiveName"expression="jsSuggestVariableName()"defaultValue=""alwaysStopAt="true" /> |
| 46 | + <variablename="directive"expression="decapitalize(DirectiveName)"defaultValue=""alwaysStopAt="false" /> |
| 47 | + <context> |
| 48 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 49 | + <optionname="JS_EXPRESSION"value="true" /> |
| 50 | + <optionname="JS_STATEMENT"value="true" /> |
| 51 | + </context> |
| 52 | + </template> |
| 53 | + <templatename="ngFil"value="(function() { /** * @usage {{ expression | $FilterName$ }} **/ /* @ngInject */ function $FilterName$FilterFactory() { return function $FilterName$Worker($input$) { var res; $END$ return res; }; } angular .module('$APP$') .filter('$FilterName$', $FilterName$FilterFactory) ; }).call(this); "description="Define a new Angular Filter"toReformat="false"toShortenFQNames="true"> |
| 54 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 55 | + <variablename="FilterName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 56 | + <variablename="input"expression=""defaultValue="'input'"alwaysStopAt="true" /> |
| 57 | + <context> |
| 58 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 59 | + <optionname="JS_EXPRESSION"value="true" /> |
| 60 | + <optionname="JS_STATEMENT"value="true" /> |
| 61 | + </context> |
| 62 | + </template> |
| 63 | + <templatename="ngSer"value="(function() { /* @ngInject */ function $ServiceName$Factory() { var self = this; $END$ } angular .module('$APP$') .service('$ServiceName$', $ServiceName$Factory) ; }).call(this);"description="Define a new Angular Service"toReformat="false"toShortenFQNames="true"> |
| 64 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 65 | + <variablename="ServiceName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 66 | + <context> |
| 67 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 68 | + <optionname="JS_EXPRESSION"value="true" /> |
| 69 | + <optionname="JS_STATEMENT"value="true" /> |
| 70 | + </context> |
| 71 | + </template> |
| 72 | + <templatename="ngFact"value="(function() { /* @ngInject */ function $FactoryName$Factory() { return $END$; } angular .module('$APP$') .factory('$FactoryName$', $FactoryName$Factory) ; }).call(this);"description="Define a new Angular Factory"toReformat="false"toShortenFQNames="true"> |
| 73 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 74 | + <variablename="FactoryName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 75 | + <context> |
| 76 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 77 | + <optionname="JS_EXPRESSION"value="true" /> |
| 78 | + <optionname="JS_STATEMENT"value="true" /> |
| 79 | + </context> |
| 80 | + </template> |
| 81 | + <templatename="ngVal"value="(function() { var $ValueName$ = { $END$ }; angular .module('$APP$') .value('$ValueName$', $ValueName$) ; }).call(this);"description="Define a new Angular Value"toReformat="false"toShortenFQNames="true"> |
| 82 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 83 | + <variablename="ValueName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 84 | + <context> |
| 85 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 86 | + <optionname="JS_EXPRESSION"value="true" /> |
| 87 | + <optionname="JS_STATEMENT"value="true" /> |
| 88 | + </context> |
| 89 | + </template> |
| 90 | + <templatename="ngConst"value="(function() { var $ConstName$ = { $END$ }; angular .module('$APP$') .value('$ConstName$', $ConstName$) ; }).call(this);"description="Define a new Angular Constant"toReformat="false"toShortenFQNames="true"> |
| 91 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 92 | + <variablename="ConstName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 93 | + <context> |
| 94 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 95 | + <optionname="JS_EXPRESSION"value="true" /> |
| 96 | + <optionname="JS_STATEMENT"value="true" /> |
| 97 | + </context> |
| 98 | + </template> |
| 99 | + <templatename="ngRun"value="(function() { /* @ngInject */ function $RunName$($rootScope, $INJECTABLES$) { $END$ }; angular .module('$APP$') .run($RunName$) ; }).call(this);"description="Define a new Angular.Module.Run Function"toReformat="false"toShortenFQNames="true"> |
| 100 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 101 | + <variablename="INJECTABLES"expression=""defaultValue=""alwaysStopAt="true" /> |
| 102 | + <variablename="RunName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 103 | + <context> |
| 104 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 105 | + <optionname="JS_EXPRESSION"value="true" /> |
| 106 | + <optionname="JS_STATEMENT"value="true" /> |
| 107 | + </context> |
| 108 | + </template> |
| 109 | + <templatename="ngConfig"value="(function() { /* @ngInject */ function $ConfigName$($INJECTABLES$) { $END$ } angular .module('$APP$') .config($ConfigName$) ; }).call(this);"description="Define a new Angular.Module.Config Function"toReformat="false"toShortenFQNames="true"> |
| 110 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 111 | + <variablename="ConfigName"expression=""defaultValue=""alwaysStopAt="true" /> |
| 112 | + <variablename="INJECTABLES"expression=""defaultValue=""alwaysStopAt="true" /> |
| 113 | + <context> |
| 114 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 115 | + <optionname="JS_EXPRESSION"value="true" /> |
| 116 | + <optionname="JS_STATEMENT"value="true" /> |
| 117 | + </context> |
| 118 | + </template> |
| 119 | + <template name="hitmands.auth" value="(function () { /* @ngInject */ function AuthServiceConfig(AuthServiceProvider, $provide) { AuthServiceProvider .useBasicAuthentication() .tokenizeHttp() .useRoutes({ login: '/api/v1/user/login', logout: '/api/v1/user/logout', fetch: '/api/v1/user/current-user' }) .parseHttpAuthData(function(data, headers, statusCode) { console.log('parseHttpAuthData', data); return { user: $user$, token: $token$, authLevel: $authLevel$ }; }); if( angular.isObject('$condition$') ) { AuthServiceProvider.setLoggedUser( $condition$['$user$'], $condition$['$token$'], $condition$['$authLevel$'] ); } /* $provide.decorator('AuthService', function ($delegate) { $delegate.custom = function (roles, user) { var AuthService = this; }; return $delegate; }); /***/ } /* @ngInject */ function AuthServiceRun($rootScope, AuthService, $timeout) { $rootScope.currentUser = AuthService.getCurrentUser(); $rootScope.isUserLoggedIn = AuthService.isUserLoggedIn(); $rootScope.$on('hitmands.auth:update', function () { $rootScope.currentUser = AuthService.getCurrentUser(); $rootScope.isUserLoggedIn = AuthService.isUserLoggedIn(); }); $rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) { if(error.publisher === 'AuthService.authorize') { console.log('Route Protected', error); } }); $rootScope.loginCredentials = { username: '', password: '', rememberMe: false }; } angular .module('$APP$') .config(AuthServiceConfig) .run(AuthServiceRun); }).call(this); " description="Define a new Angular Hitmands.auth Configuration" toReformat="false" toShortenFQNames="true"> |
| 120 | + <variablename="APP"expression=""defaultValue=""alwaysStopAt="true" /> |
| 121 | + <variablename="condition"expression=""defaultValue=""alwaysStopAt="true" /> |
| 122 | + <variablename="user"expression=""defaultValue=""alwaysStopAt="true" /> |
| 123 | + <variablename="token"expression=""defaultValue=""alwaysStopAt="true" /> |
| 124 | + <variablename="authLevel"expression=""defaultValue=""alwaysStopAt="true" /> |
| 125 | + <context> |
| 126 | + <optionname="JAVA_SCRIPT"value="true" /> |
| 127 | + <optionname="JS_EXPRESSION"value="true" /> |
| 128 | + <optionname="JS_STATEMENT"value="true" /> |
| 129 | + </context> |
| 130 | + </template> |
| 131 | +</templateSet> |