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
hola Laurita, ves lo que estoy escribiendo? | |
si |
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
/** | |
* This service showcases when to use $q to return promises and when it's not necessary' | |
*/ | |
angular.module('sample').factory('sampleService', ['$q', '$http', function ($q, $http) { | |
var service = {}; | |
// Use constants, don't do this | |
var url = 'https://api.github.com/users/pablotdl/repos'; | |
/** |
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
'use strict' | |
/** | |
* A sample controller that stores data in the $rootScope | |
*/ | |
angular.module('sample').controller('usingRootScopeController', ['$rootScope', '$scope', function ($rootScope, $scope) { | |
// Resets the list of items. | |
$scope.reset = function () { | |
$rootScope.someList = []; | |
} |