1

I would like to use angular2-dart in non-spa as in

loading two components in angular2 non SPA

i.e. in any non-spa page (not just index.html), I would like to have something like

<body>
  <my-app-a>
    loading...
  </my-app-a>

  Static content 

  <my-app-b>
      loading ..
  </my-app-b>
 </body>

How can this be done using angular2-dart? This will allow to bootstrap arbitrary Angular2-dart component(s) in any non-spa page.

1
  • I am not sure this is possible, Did you try to call the bootstrap method 2 times ? Commented Feb 27, 2017 at 11:06

1 Answer 1

1

Just call bootstrap() twice in web/main.dart, like this:

void main() {
  bootstrap(AppComponent);
  bootstrap(App2Component);
}

I just tried it and it works fine.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.