These are chat archives for angular/angular.js

26th
Nov 2016
Miguel Carvajal
@krvajal
Nov 26 2016 00:35
I am a physicist
booker04
@booker04
Nov 26 2016 04:13
yo
Guilherme Falc√£o
@guilhermefalcao
Nov 26 2016 07:53
Hey, guys! I don't know if here is the right place, but I'm thinking about start to contributing with some open source. Is AngularJS a good idea for beginners? If not, can you give me a idea of which on is better for beginners? (javascript projects, please)
CHIRAG GHANGHAS
@GhanghasChirag_twitter
Nov 26 2016 11:36
How do i pass Header and Body both in http request.
CHIRAG GHANGHAS
@GhanghasChirag_twitter
Nov 26 2016 11:46
$http.post('http://myapis/devices/user/requests',{
            headers:{'Authorization':$rootScope.authToken},
            data:{
              data:'00',
              port:'01'
            }}
          )
Is this the right way to send body in http request with header in it?
CHIRAG GHANGHAS
@GhanghasChirag_twitter
Nov 26 2016 12:00
Got it. Ignore my question.
Don't know why but writing headers, data, method and url seperately made my api work.
George Kalpakas
@gkalpak
Nov 26 2016 12:04
@GhanghasChirag_twitter : It's all in the docs, isn't it?
@guilhermefalcao : Welcome to open source :) Regarding your question: I think AngularJS is perfect for beginner in conributing, but probably not so much for JavaScript beginners. Unless you already plan on learning it, so you can start by reading the docs and help improve it (e.g. fix typos, add missing info, make sections more clear etc) and then move to more technical stuff as you get more familiar with the framework and JavaScript in general.
CHIRAG GHANGHAS
@GhanghasChirag_twitter
Nov 26 2016 13:32
@gkalpak i need help with one more thing. I have a loop. I want that loop to iterate once in every 3 seconds. Total iterations should be 5.
George Kalpakas
@gkalpak
Nov 26 2016 13:35
How can I help?
CHIRAG GHANGHAS
@GhanghasChirag_twitter
Nov 26 2016 13:36
which one will be better among following:
setTimeout , $timeout , $interval ?
George Kalpakas
@gkalpak
Nov 26 2016 14:05
One of the $-prefixed ones. Always the case in Angular 1.x :)
Which one depends on your exact requirements (although I suspect it doesn't matter much in your usecase).
$interval would be simpler.
CHIRAG GHANGHAS
@GhanghasChirag_twitter
Nov 26 2016 14:08
Okay. Thanks for the help.
Ryan Langton
@ryanlangton
Nov 26 2016 14:43
anyone familiar with systemjs? can you look at this plnkr and see why I get an error that angular.module is undefined? http://plnkr.co/edit/99hum4e6fp5uHKklwMat?p=preview
Ryan Langton
@ryanlangton
Nov 26 2016 15:11
moved it out of system js config and into a <script> tag and it works
Eugene Serkin
@jeserkin
Nov 26 2016 15:40
Don't see such error
Eder Gomez
@Ederagp
Nov 26 2016 19:49
hi!!
How to refresh the value of the variables in another page?
Dominic Watson
@intellix
Nov 26 2016 23:16
I'm using this socket.io wrapper for angular: https://github.com/btford/angular-socket-io/blob/master/socket.js#L20
getting a huge amount of messages through my socket, it's killing the site. Looks like it's triggering a $timeout for every single message
it would be better to replace that $timeout with $rootScope.$evalAsync right?
emailvenkatm
@emailvenkatm
Nov 26 2016 23:19
Hi All
beforeEach(async(() => {
TestBed.resetTestingModule();
TestBed.configureTestingModule({
imports: [
MaterialModule,
ReactiveFormsModule,
BrowserModule,
FormsModule,
HttpModule,
MaterialModule.forRoot()
],
declarations: [
ContributorProjectDetailComponent,DocumentComponent,TaskComponent
],
providers: [
            {provide: i18nService, useClass: i18nService},
             {provide: FilterService, useClass: FilterService},
            {provide: ActivatedRoute, useClass: ActivatedRouteStub},
            {provide: ProjectDataService, useClass: MockProjectDataService}

        ]
    })
        .compileComponents();

}));


    beforeEach(
    () => {

        fixture = TestBed.createComponent(ContributorProjectDetailComponent);
        comp = fixture.componentInstance;
        element = fixture.debugElement.nativeElement;           

    });

 it('should work', () => {


 });
Dominic Watson
@intellix
Nov 26 2016 23:19
emailvenkatm
@emailvenkatm
Nov 26 2016 23:20
I am getting the below error for the Unit test
zone.js:158 Uncaught Error: This test module uses the component ContributorProjectDetailComponent which is using a "templateUrl", but they were never compiled. Please call "TestBed.compileComponents" before your test
Can anyone please help me to resolve the issue
Dominic Watson
@intellix
Nov 26 2016 23:20
go to gitter.im/angular/angular instead, this room is only for ng1
emailvenkatm
@emailvenkatm
Nov 26 2016 23:20
Sure Thanks