twitter bootstrap - Failed to load template: template/typeahead/typeahead.html in Ruby on rails app -
i have running angular-app in ruby on rails project , want implement typeahead search using angular.js , can not find solution how make typeahead directive running
.
question: how install angular typeahead directive project ?
with present solution described bellow getting console :
failed load resource: server responded status of 404 (not found) http://localhost:3000/template/typeahead/typeahead.html
- ng-app working , related js , css files linked html well.
i following source: bootstrap-ui-angularjs
what did :
- downloaded
angular-ui-bootstrap.js
public\assets\javascripts
directory manifested asset pipeline usually:
//= require jquery //= require jquery_ujs //= require jquery.tokeninput //= require bootstrap //= require angular //= require angular-ui-bootstrap //= require_tree .
3.checked if js
on page:(just scripts in question)
<link href="/assets/bootstrap.css?body=1" media="all" rel="stylesheet" type="text/css" /> <script src="/assets/bootstrap.js?body=1" type="text/javascript"></script> <script src="/assets/angular.js?body=1" type="text/javascript"></script> <script src="/assets/angular-ui-bootstrap.js?body=1" type="text/javascript"></script>
my ng-app: <div ng-app='plunker'> <div class='container-fluid' ng-controller="typeaheadctrl"> <pre>model: {{result | json}}</pre> <input type="text" ng-model="result" typeahead="suggestion suggestion in cities($viewvalue)"> </div> </div> <script> angular.module('plunker', ['ui.bootstrap']); function typeaheadctrl($scope, $http, limittofilter) { //http://www.geobytes.com/free-ajax-cities-jsonp-api.htm $scope.cities = function(cityname) { return $http.jsonp("http://gd.geobytes.com/autocompletecity?callback=json_callback &filter=us&q="+cityname).then(function(response){ return limittofilter(response.data, 15); }); }; } </script>
is there missing in connection installing existing angular directives? e.g. this link
the github code contains folder called template, inside there template folder typeahead. have downloaded , added project @ correct location.
the error seems coming due typeahead template html file missing. in case has been added check if location correct.
Comments
Post a Comment