Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
Angular2 for clojurescript

I would like to build an application with clojurescript language and angular2 framework.

I've found this project on github which provided a basic exmaple of combining these two. But this is just a basic start, I've had difficulty with declaring new components and adding more of angular2 features into my app.

Are there any tutorials on this issue? Have you tried working with both clojurescipt and angular2?

Thanks for your help

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

While this is possible to do, you are going to be going quite far off the beaten path. Angular relies heavily on annotations, dependency injection, and Javascript features which is not going to be a great fit for ClojureScript.

Writing Angular like the sample below is going to be very annoying and error-prone:

(let [app (get-app)
      c (.Component (.-core js/ng)
                    #js {:selector "my-app"
                         :template (html [:div
                                          [:h1 " Demo"]
                                          [:div [:h2 "Hero List:"]]
                                          "
<input #newHero (keyup.enter)=\"addHero(newHero.value); newHero.value='' \" >
<button (click)=\"addHero(newHero.value); newHero.value='' \">Add</button>
<ul><li *ngFor=\"#hero of heroes()\">{{hero}}</li></ul>
"
                                          ])})

If you go down this path, you will mostly end up writing JavaScript in a funny DSL (ClojureScript).

It's probably worth stepping back and asking why you want to use both Angular and ClojureScript? They both have quite distinct philosophies and styles. If you are wanting to use ClojureScript, then there are several good ClojureScript frameworks for building SPA's like Om, re-frame, and rum that take advantage of ClojureScript's strengths like immutable data and functional programming.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!