Skip to content

Instantly share code, notes, and snippets.

View nerder's full-sized avatar
🍕
Pizzing

Stefano Saitta nerder

🍕
Pizzing
View GitHub Profile
angular.module('plunker', [])
.controller('MainCtrl', function($scope) {
$scope.myModel = {};
$scope.myModel.to = "init-";
//AT THE END OF EXECUTION
//What i expect to have is something like
$scope.myModel.to = "init-something-to-slug";
$scope.myModel.from = "Something to slug";
// Product page template
.state("product", {
url: "/product/:param",
templateUrl: "modules/products/product.html",
data: {pageTitle: 'Product'},
controller: "ProductController"
})
.state("product.base", {
url: "/base",
if($rootScope.securityRole){
console.log($rootScope.securityRole);
console.log(authService.isUrlAccessibleForUser(next.url));
if(authService.isUrlAccessibleForUser(next.url)){
$location.path('/authError');
}
}