Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:04
    giorgiolucca starred angular/angular
  • 00:02
    ThailandPass starred angular/angular
  • May 22 23:38
    Sanyaolu123 starred angular/angular
  • May 22 23:35
    liguangda starred angular/angular
  • May 22 23:25
    Guilhermesoaresmarques starred angular/angular
  • May 22 22:42
    fbaba-nibtravel commented #46067
  • May 22 22:05
  • May 22 21:54
    stephen-ullom starred angular/angular
  • May 22 20:29
    LucaCodez1 closed #46099
  • May 22 20:29
    LucaCodez1 commented #46099
  • May 22 20:27
    CertifiedRice commented #46099
  • May 22 20:24
    LucaCodez1 opened #46099
  • May 22 20:16
    sbelogay starred angular/angular
  • May 22 20:08
    andreistefanwork commented #45418
  • May 22 20:07
    andreistefanwork edited #46098
  • May 22 20:07
    andreistefanwork edited #46098
  • May 22 20:07
    andreistefanwork edited #46098
  • May 22 20:07
    pullapprove[bot] review_requested #46098
  • May 22 20:07
    andreistefanwork edited #46098
  • May 22 20:07
    andreistefanwork opened #46098
PaulMartin
@paul-martin123
Parallel routing was a major concern for AngularJS 1.x, and I've read docs that say it's possible with Angular2. But I haven't seen any code for it.
Alexander Wieser
@crystalbyte
@paul-martin123 I do use multiple components on a single route by simply adding them into the html source of the component.
<div>
<person-picker></person-picker>
</div>
Ken Rimple
@krimple
Anybody see this: "Cannot resolve all parameters for Router(?, ?, ?). Make sure they all have valid type or annotations." when using routing? I'm injecting ROUTER_PROVIDERS in the bootstrap method, and it had been working. What should I be checking for? The stack trace is not helping me out with any useful info to me... This started happening when I added another component to route to.
Alexander Wieser
@crystalbyte
@krimple Mind sharing some code ?
ROne
@ravi-mone
@krimple , I feel you should pass directives: [ROUTER_DIRECTIVES] in your component where routes are defined, Guys Am I correct
James Pacileo
@jamespacileo
Newbie question... Can a Components be selectively popped in a web worker or does it need to be the whole app?
Ken Rimple
@krimple
@ravi-mone - yep. I am doing that.
Getting component gist going.
Ken Rimple
@krimple
Finally, here it is. The files are in subdirectories as expected but gist doesn't allow it. Stack trace and bootstrap at bottom. https://gist.github.com/krimple/91189eb7a602996ca09c
@jamespacileo - good talk on this from Jason Teplitz - https://www.youtube.com/watch?v=Kz_zKXiNGSE - he shows what is / isn't in the web worker side of the stack and how you use it. Sample code too on github.
James Pacileo
@jamespacileo
@krimple awesome thank you! :smile: :+1:
Ken Rimple
@krimple
@jamespacileo Any time!
Robin Joseph
@robinjoseph08
I'm having a little trouble getting routerLink to work in a nested component. I have a root component that has a RouterConfig setting up my routes and the template is only <router-outlet></router-outlet>. In the child components, I'm trying to use <a [routerLink]="['Comp']"> while no errors get thrown, the href isn't generated. What's interesting though is that if I inject the Router in the child component's class, I can call this._router.navigate(['Comp']) and it works just fine. Am I just missing something?
Brandon
@brandonroberts
@robinjoseph08 routing in child components is relative. Try <a [routerLink]=“[‘../Comp']”> or <a [routerLink]=“['/Comp']”>
James Pacileo
@jamespacileo
@krimple really good speaker
Robin Joseph
@robinjoseph08
@brandonroberts I tried that too, and it didn't do anything either :/
Brandon
@brandonroberts
@robinjoseph08 Hmm. Can you reproduce in a plunker? Or share your route config?
@robinjoseph08 Do you have the router directives included in your child component directives?
Ken Rimple
@krimple
@jamespacileo I know, right? He's about 22, so I want so badly to call him sparky, but man he's so smart. I remember when I used to be bright eyed like that! Anyway, he was the guy who implemented the web worker code too. Looking forward to more videos by him.
Robin Joseph
@robinjoseph08
@brandonroberts ill try to get a plunker up. and yeah, I have directives: [RouterLink] in my child component
Daniel
@gaiottino
@ericmartinezr hmm. I'm not convinced. It feels very strange that Angular would or should pickup listeners from other libs. It doesn't seem to be that that is quite the case either. Because if I add it to a script-tag in index.html then it's not picked up. I tried adding it to a setTimeout but that still caused many many updates in Angular :-/
Brandon
@brandonroberts
@krimple do you have the router bundle included in your scripts?
Ken Rimple
@krimple
@brandonroberts yes... I am trying to get a plnkr together on it too, just to check my work.
Daniel
@gaiottino
Basically I want to catch if the DOM inside an ng-content tag has changed. How would I go about doing that?
Ken Rimple
@krimple
And it was working fine before, so something borked it. Just not sure what.
Brandon
@brandonroberts
@krimple remove Router from your bindings in the blogroll.ts
You don’t need it there
Ken Rimple
@krimple
oh dang, that's probably it.
oh, actually - I was injecting it in the constructor so I could chnage the route when I finished editing...
so if I am using a service, don't I need to add it as a binding in the component I'm injecting it into?
Brandon
@brandonroberts
Naa .. Since router providers is in your bootstrap you don’t need to add it as a binding
Its available to be injected anywhere
Ken Rimple
@krimple
btw that did it, @brandonroberts
Brandon
@brandonroberts
:+1:
Ken Rimple
@krimple
So, me dumb... ROUTER_PROVIDERS basically included the Router service?
coolio!
Brandon
@brandonroberts
Yep
Ken Rimple
@krimple
ok, many thanks, I knew it was dumb.
Brandon Angelakos
@bangelakos
Does anyone know when the additional parts of the official Angular.io tutorials will be complete?
Chad Autry
@chad-autry
Anyone else have issues where their app works fine on Chrome, but just won't work in Firefox (no error I can see) or IE (" ` " is an invalid character)
James Pacileo
@jamespacileo
@krimple 22! Glad Angular team is full of bright people :smile:
Sergey Kuzminskiy
@OverGreed

Hi guys, I have a question about binding data(ngModel). I am trying to make a simple example:
boot.ts:
import 'reflect-metadata';
import {bootstrap} from 'angular2/platform/browser';
import AppComponent from './app.component';
bootstrap(AppComponent);

app.component.ts:
import {Component} from 'angular2/core';
@Component({
selector:'my-app',
templateUrl: 'templates/app.component.html'
})
export default class AppComponent {
yourName: string = 't1';
test(){
console.log('click');
}
}

app.component.html:

<div>
<label>Name:</label>
<!-- data-bind to the input element; store value in yourName -->
<input type="text" [(ngModel)]="yourName" placeholder="Enter a name here" />
<hr>
<!-- conditionally display `yourName` -->
<h1 [hidden]="!yourName">Hello {{yourName}}!</h1>
<button (click)="test()">Test Click</button>
</div>

the problem is with ngModel always show t1 and never redraw it,
but if I press test button the value is changed it class.
The only different with examples it that I try to build project with Gulp and browserify.

Ken Rimple
@krimple
@jamespacileo Maybe even younger. That's a guestimate - he did intern at Google last summer when he wrote it. That team is scary smart.
Daniel
@gaiottino
So. If I add the listener in System.import('app').then(...) then it's not picked up. http://plnkr.co/edit/X2m7Wp0mYQtkUR4M9NNs?p=preview It must be possible to wrap an external script and not have angular react to all listeners.
Chad Autry
@chad-autry
@chad-autry My issue was firefox doesn't support 'let' out of the box, and IE doesn't support template strings yet.
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.