Skip to content

Instantly share code, notes, and snippets.

@Mouvedia
Last active February 21, 2017 20:31
Show Gist options
  • Save Mouvedia/70ea465afa3d28975a2b6162c2488dd8 to your computer and use it in GitHub Desktop.
Save Mouvedia/70ea465afa3d28975a2b6162c2488dd8 to your computer and use it in GitHub Desktop.
try {
angular.bootstrap(document.body, ['moduleName']);
} catch(e) {
angular.element(document.body).injector().invoke(function($compile) {
var scope = angular.element(element).scope();
$compile(element)(scope);
scope.$apply();
});
}
(function () {
'use strict';
var app = angular.module('', [
''
]);
app.constant('', );
app.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'path/?.html',
controller: '?Ctrl',
title: '?'
})
.otherwise({
redirectTo: '/'
});
})
.run([/*'$location',*/ '$rootScope', function(/*$location,*/ $rootScope) {
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
window.document.title = current.$$route.title;
});
}]);
})();
angular.module('?').controller('?Ctrl', ['$scope', '?Factory', '?Service',
function ($scope, ?Factory, ?Service) {
}
]);
angular.module('?').factory('?Factory', ['?',
function (?) {
}
return ;
]);
angular.module('?').service('?Service', function() {
this.? = function () {
}
});
angular.module('?', []).directive('?', function() {
return {
restrict: 'E', // 'ACM'
replace: true,
tranclude: true,
//scope: true, // inherited
//scope: false, // synchronized
scope: {
?: '@',
?: '=',
?: '=?',
?: '&'
},
templateUrl: 'path/.',
/*template: '',
controller: function ($scope, $element){
},
compile: function(element, attributes){
return {
pre: function(scope, element, attributes, controller, transcludeFn){
},
post: function(scope, element, attributes, controller, transcludeFn){
}
}
},*/
link: function ($scope, $element, $attributes) {
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment