Questions tagged [angular-rc5]

14 questions
8
votes
1 answer

Angular 2 Pipes executing before ngOnInit

I have a implemented a custom Pipe in Angular 2 RC5 which processes data that I get from the server. The problem I'm having is that the Pipe executes before the ngOnInit which is where I am making the calls to the server. As a test I passed…
Daniel Grima
  • 2,765
  • 7
  • 34
  • 58
5
votes
2 answers

model based forms in angular 2 rc5 not working

I am migrating code from angular beta to RC5 version. and i am facing issue with the model based forms used. As i have to much forms already developed in angular 2 beta. its hard for me to changes model based forms to template based forms. any help…
sachin kulkarni
  • 737
  • 1
  • 13
  • 26
4
votes
2 answers

How to create an Http instance WITHOUT using constructor DI? (RC.5+)

I need to get an instance of Http without using Angular2's DI ( constructor(private http: Http) ) The following code was taken from another stackoverflow question, and it works in Angular2 RC.4 and earlier versions, but not in RC.5+(HTTP_PROVIDERS…
Lucio Mollinedo
  • 2,295
  • 1
  • 33
  • 28
4
votes
1 answer

angular 2 RC5 ngModules vs. barrels

In our project we are moving from Angular 2 RC4 to RC5. Question is: with the introduction of ngModules, will the barrels (index files) become unnecessary? Or can you use both in parallel? how to use these 2 concepts?
Doek
  • 161
  • 9
3
votes
1 answer

Angular 2 TestBed, Mocking Methods without Dependency Injection

Using TestBed, we are able to create mock classes for classes that are available with dependency injection. For example, MyButtonClass has access to ElementRef and MyService since they are implemented with dependency injection, and so we can…
jayscript
  • 319
  • 2
  • 5
  • 13
2
votes
1 answer

Angular 2 RC5 Testing Promises in ngOnInit Not Working

I am trying to test a structural directive named MyDirective with Jasmine. The Angular version used is RC5. // Part of the MyDirective class @Directive({selector: '[myDirective]'}) export class MyDirective { constructor(protected templateRef:…
jayscript
  • 319
  • 2
  • 5
  • 13
1
vote
1 answer

Nesting components in Angular4 (RC5)

Getting into Angular and watching an outdated tutorial which is in fact for Angular2 (y, I know). Angular4: @NgModule({ imports: [ BrowserModule ], declarations: [ AppComponent , MyChildComponent ], bootstrap: [ AppComponent ] }) Seems that…
1
vote
1 answer

angular 2 compiler/cli AoT in Rc5

currently i am using tsc compilet(JIT) to compile my angular 2 application. for performance improvisation i am trying to switch to Aot Compilation using compiler/Cli. I am referring this blog for AoT in my Rc5 Application. but stuck due to error…
sachin kulkarni
  • 737
  • 1
  • 13
  • 26
1
vote
1 answer

Angular 2 (RC6) - Routing in the startup component doesn'n work

In my real world application I want to check in the startup component (usually app.component.ts) if a user is authenticated. If not, I want to route them to the login component. But routing doesn't work here. I create a simple Plunker example, where…
Martin Schagerl
  • 583
  • 1
  • 7
  • 19
1
vote
3 answers

Angular-cli RC 5 Adding multiple components to app.module.ts

In my Angular-cli RC5 project I am trying to create charts. Created a new component as "chart" Created a directive as "line-graph.directive.ts" Folder structure. app.module.ts import {NgModule, enableProdMode} from '@angular/core'; import…
Rose18
  • 2,892
  • 8
  • 47
  • 98
1
vote
1 answer

angular 2 RC5: platform-browser.umd.js:937 EXCEPTION: Error: Uncaught (in promise):

I'm using service to make a request. homepage.service.ts import { Injectable } from "@angular/core"; import { Http, Response } from "@angular/http"; import { Observable } from "rxjs/Observable"; import { PATH } from "../const/config"; import {…
Radonirina Maminiaina
  • 6,958
  • 4
  • 33
  • 60
0
votes
0 answers

Uncaught ReferenceError: System is not defined in Angular 2

I am working on angular 2 application that is 2.0.0-rc.4 version. While running to project I am getting error Uncaught ReferenceError: System is not defined in the index.html file Could somebody tell me what the problem could be Snapshot of the…
Tom
  • 8,175
  • 41
  • 136
  • 267
0
votes
1 answer

Property 'createAsync' does not exist on type 'TestBed'

I'm using angular2-cli to create projects and this spec file is automatically made by cli for one of my component. I upgraded my app to rc4 and since then I've been encountering this issue when I run this test file. Below is the spec file: import…
Aiguo
  • 3,416
  • 7
  • 27
  • 52
0
votes
2 answers

Angular 2 rc.5 unable to refresh page after updating from rc.4

I have just finished updating my app from rc.4 to rc.5 and I'm encountering a weird error. When I hit localhost:8080 I am redirected to localhost:8080/browse as expected, however when I then hit the browser refresh button I get the following error:…
efarley
  • 8,371
  • 12
  • 42
  • 65