mardi 24 novembre 2015

Using Algoliasearch Client JS Angular Module with RequireJS in a Rails Application

Even though the Wiki says it supports all major module loaders, I am unable to figure this one out. Googling is not yielding any helpful results.

I am trying to use algoliasearch-client-js (Angular build) in our existing Rails 3.2 application where in we use RequireJS for AMD support with pre-compilation. I am using requirejs-rails gem and maintaining a requirejs.yml to manage paths config:

image

and this file is under the /vendor directory:

image

I am adding this to the angular module:

var app = angular.module('events', [
        'app.controllers',
        'app.directives',
        'app.filters',
        'app.factories',
        'app.services',
        'ngCookies',
        'algoliasearch'
    ]);

but still it is unable to find this module and looking at a wrong place: enter image description here

This works locally but compiling the assets gives problems. Any pointers to resolve this issue is appreciated.

Aucun commentaire:

Enregistrer un commentaire