7

I need to integrate the app generated by angular-cli into Sails.js. I come from php background so I am new to both these frameworks.

  1. How do I set them up as one?
  2. How do I run ng serve and/or sails lift?
  3. How do I manage Angular routes vs Sails routes?

Thanks.

Besto
  • 109
  • 1
  • 11
  • I my opinion manage angular and sails as seperate that is dont combine frontend and backend. When u want single application create final dist folder in angular-cli and place it inside sails. – thangavel .R Jul 27 '17 at 10:45

2 Answers2

3

following blog can help you to integrate sails with angular 2 http://sharpten.com/blog/2016/02/02/integrating-angular-2-with-sails-js.html

you can download code from https://github.com/xmaestro/sails-angular2

Arjun Kava
  • 5,303
  • 3
  • 20
  • 20
  • 2
    The above is out of date. angular-cli switched build systems from systemjs to webpack. – mryarbles Jan 08 '17 at 16:12
  • This tutorial and repo is a great starting point, for your View. `sails lift` runs, error-free. Displays the sample Angular 4 app. – Leo Jul 23 '17 at 17:58
0

See this skeleton for Sails and Angular 2

It's integrates also the grunt task for develope automation

The client is Angular 4 (It's quite the same as Angular2) + Bootstrap 4

The server is Node JS (it's use Sails as MVC framework)

Janka
  • 1,908
  • 5
  • 20
  • 41