Tagged Questions
The second version of the AngularJS web framework. Angular 2 takes a web component-based approach to building powerful applications for the web. It is used along with TypeScript which provides support for ECMAScript 5, ECMAScript 6, and ECMAScript 7.
0
votes
1answer
23 views
What is the difference in Angular 2 between using [ngStyle] and [style.attribute]
Using Angular 2, what is the difference between using the following 2 options for passing a variable value to a style? Are there pros and cons, or is it just personal choice, or is one more flexible/...
0
votes
1answer
12 views
Angular 2 live site different to npm start site
Currently my live site and production site (the one where you get an ip and port) look different for some reason. Is there any reason why? Is there a setting I somehow missed? It was matching the ...
0
votes
0answers
7 views
Access the apps ngrx store from new Object
I understand that the current ngrx store can be accessed by injecting it into things like angular 2 components but I need to dispatch an event from a separate object. Many copies of the object can be ...
0
votes
3answers
20 views
Angular 2 http get observable called twice
In Angular 2 v2.0.1 the onInit is called twice. (Obviously I'm also doing something wrong when it's called once, but that's not the issue right now)
Here's my Plunker: http://plnkr.co/edit/...
0
votes
0answers
12 views
Angular 2 change detection (websql?)
I'm trying to build my first Angular 2 app with Ionic 2 and I'm struggling with a simple challenge.
I have ClientService which has an observable property containing an immutable list of clients, a ...
0
votes
1answer
9 views
Angular 2 Bootstrapping Options
Just kick started with Angular 2.
What are the various Bootstrapping options in angular 2?
Why is that when I make a change and refresh the index.html takes little time to retrieve the HTML markups?
0
votes
0answers
14 views
Angular2: angular-cli production works in Chrome, not IE or FF
Angular2: angular-cli production works in Chrome, not IE or FF
all is well here: http://secure.digitalsignage.com/boiler/
when using chrome but try in IE or FF and bunch of errors.
and I have ...
0
votes
0answers
8 views
Error: Cannot find typescript def for ‘node’ inside events.d.ts file
ionic 2.1.13
typings 2.0.0
npm 4.0.2
cordova 6.4.0
I'm building an Ionic 2 app with Firebase, the app has ran successful so far but now I'm getting this error,
screen capture of error message
I'...
1
vote
0answers
7 views
Mapbox GL JS and Ionic 2 RC3 issue : mapbox-gl\js\util\util.js Unexpected token
I have the following issue in my Web browser while trying to use ionic 2 and MapBox GL JS (I did a simple ionic serve) :
Error: Module parse failed: C:\Workspace\mapBox\node_modules\mapbox-gl\js\util\...
0
votes
0answers
10 views
Ternary operator within [ngValue]; dynamically deselecting select value
I have a situation where I'd like to clear the value from a select input on a form (reactive) if a user changes their selection from another dropdown (this also hides the select input in question. ...
0
votes
0answers
15 views
Angularjs 2 Symfony3 REST API - can't handle request
I'm trying to build restful app with Symfony 3 and Angularjs 2.
I have working backend, but I have problem with frontend.
Angular can't display data received from Symfony, but I can see it in ...
0
votes
1answer
15 views
My Typescript-based Angular 2 App Started Compiling Javascript Files Within the App Folder
My Angular 2 app uses Typescript, and everything gets compiled down to Javascript files in the "dist" folder. Everything was working as expected, with ts (Typescript) files in my "app" folder and ...
0
votes
0answers
8 views
Typescript 2 enum referencing between interfaces and classes
I asked a similar question a couple of years back and I think the answer I got never just agreed with me completely. Since I'm using Angular 2 and Typescript 2 now, I'll ask this in the context of ...
0
votes
1answer
30 views
Add new attribute JSON in TypeScript
I have an issue , I need to add new Attribute in an object Json but I found this problem in TypeScript
error TS2339: Property 'condition' does not exist on type '{ field:
string; value: string; ...
0
votes
0answers
7 views
import Pubnub into Angular2 webpack app
I am trying to import PubNub into my Angular 2 webpack project. I successfully installed the pubnub npm package and included the import of PubNub into my vendor folder which webpack imports on ...
0
votes
0answers
9 views
Using Radio buttons in Ionic2
I receive the following error when I try to use Radio buttons in ionic2
Error: Error at
/Users/xyz/something/.tmp/pages/new-group/new-group-frequency.ngfactory.ts:528:29
[16:10:25] ...
-1
votes
1answer
13 views
Cannot read property 'next' of undefined using angular 2 Subject
I implemented bidirectional-service communication as described here https://angular.io/docs/ts/latest/cookbook/component-communication.html#!#bidirectional-service
import { Injectable } from '@...
1
vote
1answer
20 views
Angular 2 Reactive Forms : How to bind to @Input?
I have a table that on click of a link within a row, a modal pops up that will show a form where you can edit the information of that table.
I am trying to use a Reactive Forms approach with this ...
0
votes
1answer
19 views
Angular 2: Change element based on authenticated property
I've got an Angular 2 app that I have integrated authentication into using a service. The user can login, and when there is a token in the localStorage the user is considered authenticated. I have a ...
0
votes
1answer
16 views
Angular 2 DI Injects function rather than object
I have a 'store' service that relies on a 'repo' service. My component uses the service. The 'store' service seems to be injected just fine, but the repo service it gets injected seems to be a ...
0
votes
1answer
13 views
Disable Search Field For Non-logged in Users in an Angular 2 App
I've set up a login component and view, and it's working as expected in terms of preventing users from visiting AuthGuard protected routes when they're not logged in. However, I also have a search bar ...
0
votes
1answer
15 views
Angular 2 - bypasscecurity
I habe problem with the "security" of angular 2. I try to calculate a span-witdh within a ngfor-loop:
<span style="width:updateStyle({{ ((date | amDifference : item.startdate : 'minutes' :true)...
0
votes
0answers
16 views
XMLHttpRequest cannot load http://localhost:8080/ScoSopService. No 'Access-Control-Allow-Origin' with angular 2 and java
I am getting this error XMLHttpRequest cannot load http://localhost:8080/ScoSopService. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is ...
0
votes
1answer
24 views
Angular2 GZIP issue when I run my app
I have an angular2 typescript app.
I host with Firebase and use cloudflare for speed, caching and protection.
The browser header says: accept-encoding:gzip, deflate, sdch, br
This gets converted to ...
0
votes
1answer
11 views
Angular 2 video player
I am new Angular 2 and I am trying to build a video playlist. I am displaying my favorite videos in a table format and when I click on a row I want to play a video. Right now I am passing the video ...
0
votes
0answers
12 views
Angular 2 + Openlayers 3, Loses the component reference when I add the function to an interaction
I need to keep my component reference when i create new interaction with an function. So an example:
In a DrawComponent.ts:
@Input() map:any;
layer:any;
// Filters functions
layerFilter(itemLayer:...
-2
votes
0answers
13 views
Angular2 + Typescript + Gulp Development and Production build configurations
I am starting down the path of Angular2 and Typescript and I am interested in an example/tutorial on how to build for development and production using gulp. I have come across a couple of things but ...
0
votes
0answers
11 views
Allow changes for input properties without dirty check in Angular2
I have component with set method:
@Input('message')
set messageFromSocket(String message) {check(details)}
The message can be like 'some entity updated', and emitted from host component of many ...
0
votes
0answers
10 views
Testing that router.navigate() has been called in a method returning an Observable<boolean>
I have a service which for one reason or another is accessing the router using this syntax:
this.injector.get( Router ).navigate( ['/login'] );
In the test for the CanNavigate method of this service,...
0
votes
0answers
17 views
Cannot find name error Typescript
The editor is highlighting the following lines:
supports: Support[];
filteredSupports: Support[];
The errors are:
Cannot find name 'Support'.
and
{ q: string; }' is not assignable to ...
0
votes
0answers
5 views
Mocking RouterStateSnapshot in Jasmine testing
Although I have been writing Angular 2 for a while now, I am only just writing my first Jasmine tests and have run into a little difficulty. I am trying to test that the CanActivate method of service ...
1
vote
0answers
22 views
Service workers implementation within Angular 2 app
given the fact that as of today (december 2016) --mobile flag has been temporarily removed from Angular-cli (Github statement), how would you implement service-workers within an Angular app? Thank you ...
0
votes
0answers
12 views
Angular2 - Stand alone components
Can I do a partial bootstrap of all the components created so that we can use any of the components at a point of time?
For eg, if i have 5 components which has been bootstrapped in the app.module, ...
0
votes
1answer
17 views
How can I configure AWS S3 Bucket routing to work with html5 style routing?
I have a web app (using Angular 2 with webpack) that should not require more than static file hosting...except that I am using html5 style routing (slashes rather than hashes). I would like to host it ...
-2
votes
1answer
16 views
Angular 2 create directive to stop typing if input value pattan is invalid
I wanted to know how to create a directive to stop typing if input value pattan is invalid.
Something similar to bellow Angular 1 example directive.
app.directive("regExInput", function () {
"...
1
vote
0answers
12 views
Angular2 stop propagation hover event on child elements, which replays animation
I made an hover efect in angular way, but I have trouble with propagation hover on child element, on child elements. When Hower touch button, animation is replayed.
When I use mouseenter() I have ...
0
votes
0answers
15 views
Angular2 Manually enter input while still using DatePipe
I have an input that is populated using an ngb-datepicker. I also want to be able to manually populate the input, which right now it does not do. The issue lies in my getDate function which formats ...
-1
votes
1answer
7 views
Angular2 and material design lite text area value
I have a materiel design lite page with :
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<textarea name="categoryName" class="mdl-textfield__input" ...
0
votes
0answers
25 views
Angular 2 - Can't resolve all parameters for component: (?)
I started an Angular2 app and I have an issue since days !
Can't resolve all parameters for HomeComponent: (?).(…)
But my issue is not about a particular provider : Everyting that I try to inject ...
0
votes
0answers
10 views
Angular 2 Multi Step Form progress bar with
I am trying to make a flow which is very similar to (http://plnkr.co/edit/M03tYgtfqNH09U4x5pHC?p=preview)
but with angular2. I have the flows ready although not taking the state or data into ...
0
votes
0answers
5 views
Ionic2 :: Using singleton service in Modal page
I have a service which is supposed to be a singleton and needs to be accessed from multiple views. By adding the service in the providers array in app.components.ts, I am able to access a singleton ...
0
votes
1answer
38 views
Argument of type { value: number} is not assignable to parameter of type ‘AlertInputOptions’
I am trying to pass a number parameter to the Alert attribute (value) but i am failing to do... I am looping through, but it give error Type of property 'value' are incompatible. Type 'number' is not ...
0
votes
1answer
18 views
Migrating MVC 5 Project to Angular 2
Any suggestion on the approach for migrating .Net MVC 5 project to Angular 2. It's a big project and we cannot just wait for the complete transition. We are kind of looking for a parallel move when we ...
1
vote
1answer
18 views
Angular 2 cannot read property 'get' of undefined
I have seen this error on SO quite a few times, all I can find on it is that I need to make sure that I have my service Provided in my app.modules, and then call it in my constructor of my component. ...
0
votes
1answer
11 views
How to implement multiple select dropdow with grouping in angular 2 application?
How can I implement multiple select drop down with grouping in my angular 2 application? I need the drop down like the images linked in this question How can implement grouping in ng-select of ...
0
votes
0answers
9 views
How would I go about dynamically creating a server on users computer with global socket.io and Angular 2
I want to open up a server when a user loads up an app so that other users can connect straight to the computer with sockets.
0
votes
2answers
17 views
Angular-CLI import primeng
I am trying to get primeng working in my angular2 project but have yet to get it working.
Steps taken:
Installed: npm install primeng --save
Added to module
import {DialogModule} from 'primeng/...
1
vote
1answer
14 views
ng2-dragula [dragula] (angular2 drag and drop) - *ngFor with [dragulaModel] attribute not working
Using ng2-dragula drag and drop wrapper library for angular 2 dragula.
https://github.com/valor-software/ng2-dragula
Seeing issues with the [dragulaModel]='myList' ... when the item gets dropped ... ...
1
vote
1answer
13 views
RouterLink not working in child components
I have a simple app with the following structure in my main app.html file.
<navigation-list [unreadEmailCount]="unreadEmailCount| async"></navigation-list>
<router-outlet>&...
0
votes
0answers
21 views
Is there a way to emit event inside directive
I use Angular2 and write some @Directive with drag and drop (in some bounded area) and want to emit event when dragging is end - so when dragging is end I invoke method endDragging. 1. how body of ...