Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 22:47
    AndrewKushnir synchronize #44356
  • 22:38
    AndrewKushnir synchronize #44356
  • 22:37
    JoostK assigned #44353
  • 22:21
    google-cla[bot] labeled #44356
  • 22:21
    AndrewKushnir labeled #44356
  • 22:21
    AndrewKushnir opened #44356
  • 22:08
    pullapprove[bot] review_requested #44347
  • 22:02
    Sebi2020 commented #28738
  • 21:54
    asteidle70 commented #11859
  • 21:52
    asteidle70 commented #11859
  • 21:50
    asteidle70 commented #11859
  • 21:49
    znikola opened #44355
  • 21:47
    asteidle70 commented #11859
  • 21:44
    ngbot[bot] milestoned #44353
  • 21:44
    ngbot[bot] milestoned #44353
  • 21:44
    AndrewKushnir labeled #44353
  • 21:44
    AndrewKushnir labeled #44353
  • 21:44
    ngbot[bot] milestoned #44351
  • 21:44
    AndrewKushnir labeled #44351
  • 21:44
    AndrewKushnir labeled #44351
Cody Lundquist
@meenie
@krimple: Just to be clear why that worked (if you didn't know, or anyone else reading this), every time you "provide" something, it creates a new instance for itself and it's children. Since you were providing the router again in your child component, it didn't have any routes configured anymore.
Daniel
@gaiottino
Does anyone know how to run Angular2 without System.js? I'd like to get my installation into a Rails environment and served using sprockets.
Eric Martinez
@ericmartinezr
Have you tried with some bundling system like jspm or webpack?
Daniel
@gaiottino
@ericmartinezr No. I'm not really used to the node world. Which one do you think would work best? I'll have to read up on whether either is a decent alternative. But for conversation sake, when running a production environment, one does not rely on System.js to load files as needed right? Is the norm not to serve all JS content at once?
Daniel
@gaiottino
@ericmartinezr seems jspm might be a way forward.
Eric Martinez
@ericmartinezr
Right, that's what I've read in this chatroom as well. But I have no experience in the subject. People will always answer : There's not perfect solution, so you would have to see which one works better for you.
You can ask though, and wait for an answer. There's people who know a lot about this, so they can put you in the right path.
Chad Autry
@chad-autry
So its still incomplete and has some issues I'm working out, but thought I'd show the app template I've been working on. http://chad-autry.github.io/ng2bp it at least has some of the basics going.
Kaveh Shahbazian
@dc0d
Using import {Http, HTTP_PROVIDERS} from 'angular2/http'; shows 'Unexpected token <'; is this a bug? Or I'm doing something wrong?
Brandon
@brandonroberts
@dc0d you need to include the http bundle in your scripts
Oleg Korsak
@kamikaze
@brandonroberts https://gitter.im/angular/angular?at=5681792d653b30761d765b91 -- sorry for being away. So you don't even have a working link in left top corner? "Sign up" ?
Brandon
@brandonroberts
@kamikaze yes, the link in the top left corner works, but its outside your route with the form
Oleg Korsak
@kamikaze
yes... that's what I'm talking about. Here is my RouteConfig in app.ts:
```
@Component({
  selector: 'app',
  viewProviders: [AuthenticationService],
  templateUrl: './components/app/app.html',
  styleUrls: ['./components/app/app.css'],
  encapsulation: ViewEncapsulation.None,
  directives: [ROUTER_DIRECTIVES],
  providers: [HTTP_PROVIDERS]
})
@RouteConfig([
  //{path: '/', as: 'Index', redirectTo: '/signin'},
  {path: '/', component: SigninPageComponent, as: 'Index'},
  {path: '/signin', component: SigninPageComponent, as: 'Signin'},
  {path: '/signup', component: SignupPageComponent, as: 'Signup'},
  {path: '/...', component: AuthorizedViewComponent, as: 'AuthorizedView'}
])
export class AppComponent {}
and here is a routerLink:
<a [routerLink]="['/Signup']">Sign Up!</a>
it's the same in top level and in component child component
and it works when you catch a breakpoint in router.js RouterLink -> set()
and then continue
looks like something is not "loaded" when RouterLink executes
so inner link is broken without pause
Brandon
@brandonroberts
Where are you including the angular2-polyfills like reflect-metdata and zone.js?
Oleg Korsak
@kamikaze
me?
Brandon
@brandonroberts
@kamikaze yep
@kamikaze based on your source you’re missing the angular2-polyfills.js in your shims section
hm
will try to fix that
any doc on this?
Oleg Korsak
@kamikaze
hmmmm
actually my project is right from that repo... :) strange that my config misses that
thanks
@brandonroberts thanks a lot, it worked!
Brandon
@brandonroberts
@kamikaze :+1:
Oleg Korsak
@kamikaze
but another thing is that location doesn't change in address bar
when you click signup
but it changes when I manually navigate to the same route in code
why is that?
Chad Autry
@chad-autry
I have

I have

router.config([
                { path: '/home', component: homeComponent, name: 'Home', useAsDefault: true },

And that will re-route locally when I hit the html file, but not when hosted with github pages. Anyone have a clue why?

Oleg Korsak
@kamikaze
@brandonroberts any ideas?
Brandon
@brandonroberts
@kamikaze can’t really tell since its minified, but it seems like your route component is missing a dependency.
Oleg Korsak
@kamikaze
@brandonroberts yeah, you were right :) thanks a lot again
Brandon
@brandonroberts
:-)
Alexander Wieser
@crystalbyte
Good evening.
Whats the ideal way to access DOM properties such as window, document inside a component ?
Alexander Wieser
@crystalbyte
@qdouble Thanks for the hint, these two, however, only allow access to the DOM of the component itself, not to the root, such as window or document.
I know I can simply call the cssSelector, however this seems a bit fishy and indirect, just thought there might be a better way.
Anthony
@qdouble
@crystalbyte I think it's been said a few times on here that angular and other frameworks are purposely set up for there not to be direct dom access
Alexander Wieser
@crystalbyte
@qdouble How do you then for instance call setTimeout, which sometimes is necessary in order for angular to work properly ?