Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions zeppelin-web/src/components/navbar/navbar.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ angular.module('zeppelinWebApp').controller('NavCtrl', function($scope, $rootSco
});
};

$scope.search = function() {
$location.url(/search/ + $scope.searchTerm);
$scope.search = function(searchTerm) {
console.log('search term ', searchTerm);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove console.log from here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prabhjyotsingh oh, Thank you!

$location.url(/search/ + searchTerm);
};

function loadNotes() {
Expand Down
2 changes: 1 addition & 1 deletion zeppelin-web/src/components/navbar/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<!--TODO(bzz): move to Typeahead https://angular-ui.github.io/bootstrap -->
<form role="search"
style="width: 300px; display: inline-block; margin: 0 10px"
ng-submit="search()">
ng-submit="search(searchTerm)">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i definitely like passing the argument to search instead of taking it from the $scope 👍

<div class="input-group">
<input
type="text"
Expand Down