Skip to content

Instantly share code, notes, and snippets.

@davetron5000
Created August 28, 2015 15:05
Show Gist options
  • Save davetron5000/798e59fa553d7d0855cd to your computer and use it in GitHub Desktop.
Save davetron5000/798e59fa553d7d0855cd to your computer and use it in GitHub Desktop.
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require angular
//= require_tree .
console.log("application.js called");
var app = angular.module('customers', []);
console.log("customers_app.js called!");
app.controller("CustomerSearchController", ['$scope', function($scope) {
console.log("CustomerSearchController function called");
$scope.search = function(searchTerm) {
console.log("search function called");
$scope.searchedFor = searchTerm;
};
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment