neo4j-examples/sdn-university

Cipher Query and Angular

sergyyT opened this issue · 1 comments

Im found cipher query in StudyBuddyRepository.java but it fully unused in app.
Can you show me how to use cipher query in SDN4 with Angular? I tried do custom cipher query myself but without success.

Hello.
It possible to sent custom query with parameters from UI (Angular js ) to Neo4j data base.

In SocialReporository.java
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@query( "MATCH (c:user),(u:user)"

  • " WHERE (user { name:{c}}) AND (user { name:{u}})"
  • "CREATE (c)-[:FOLLOWS]->(u)")
    void follow(@param("c") String currentusername,@param("u") String name );
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

For example If parameter to sent from UI. How to invoke this query from Angular JS code? It possible to use $resource serves or $http?