Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

fix(projectsApp): remove unused $timeout and corresponding tooltip #141

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ <h2>Todo</h2>
$scope.projects = Projects;
})

.controller('CreateCtrl', function($scope, $location, $timeout, Projects) {
.controller('CreateCtrl', function($scope, $location, Projects) {
$scope.save = function() {
Projects.$add($scope.project).then(function(data) {
$location.path('/');
Expand Down Expand Up @@ -701,7 +701,6 @@ <h2>JavaScript Projects</h2>
, "otherwise": "The <code>otherwise</code> route specifies which view to display when the URL doesn’t match any of the explicit routes. It’s the default."
, "Projects": "<code>Projects</code> is an instance of <code>$firebase</code>, and is defined in the <code>projects</code> module. It exposes method to add, remove and update projects in the collection. Its purpose is to abstract the server communication. This lets the controller focus on the behavior rather than the complexities of server access."
, "$scope": "We can immediately assign the set of projects to our scope, and they will be displayed in the view."
, "$timeout": "The callback for Projects.$add is called asynchronously, and we have to use $timeout to ensure $location has the right context when it executes."
, "$location": "You use the <code>$location</code> service to access the browser's location."
, "path": "Use the <code>path</code> method to change the application's 'deep-linking' location. Changing the URL will automatically activate the new route, and transition the application to display that view -- in this case, the <code>/edit/</code> view."
, "$routeParams": "Here, we ask AngularJS to inject the <code>$routeParams</code> service. We use it to access the parameters extracted from the route path definitions."
Expand Down