This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Module | |
* | |
* Description | |
*/ | |
angular.module('app', []) | |
.controller('nameCtrl', function($scope){ | |
$scope.logged = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<ul> | |
<li ng-repeat='item in itens'> | |
<a href="{{item.url}}" ng-if='logged' data-ng-bind='item.nome'></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app', ['ngResource']) | |
.config(function($stateProvider){ | |
$stateProvider | |
.state('resolveExample',{ | |
url : '/employees', | |
views: {'content': {templateUrl : 'expose/listExamples/example',controller: 'exampleList'}}, | |
//Aqui é onde toda a mágica acontece! este é o nosso Resolve | |
//Nele será resolvida a promise e preparada para ser injetada como dependencia no controller exampleList | |
resolve : {promiseResolved : function(){ |
NewerOlder