[AngularJS] Re: [Angular2][Router-deprecated] How to trigger an action before route changes and/or before view is initialized (in a service)

2016-06-05 Thread Günter Zöchbauer
https://angular.io/docs/ts/latest/api/router/index/OnActivate-interface.html https://angular.io/docs/ts/latest/api/router-deprecated/index/CanActivate-decorator.html https://github.com/angular/angular/issues/4112#issuecomment-153811572 On Sunday, June 5, 2016 at 3:03:40 PM UTC+2, Günter Zöchbauer

[AngularJS] Re: [Angular2][Router-deprecated] How to trigger an action before route changes and/or before view is initialized (in a service)

2016-06-05 Thread Günter Zöchbauer
You can use `OnActivate` or `CanActivate`. There is an open issue AFAIK that one of these doesn't wait for a returned promise to complete. I think just wrapping the template with `*ngIf="data"` is a good solution to prevent rendering unless data is available but many don't like it. On Sunday, J

[AngularJS] Re: Erreur : TypeError: Cannot read property 'test' of undefined

2016-05-11 Thread Günter Zöchbauer
Change `function()` to `()=>` https://www.google.at/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiN0fex39HMAhXF2ywKHWT5DOYQFggbMAA&url=https%3A%2F%2Fdeveloper.mozilla.org%2Fde%2Fdocs%2FWeb%2FJavaScript%2FReference%2FFunctions%2FArrow_functions&usg=AFQjCNFVlx1d6Ugpf5ene4iHJq_5ezUpLQ&sig2=j5t

[AngularJS] Re: Routes import and @angular meaning in imports and env setup for main repo

2016-05-08 Thread Günter Zöchbauer
http://stackoverflow.com/questions/36861628/location-and-hashlocationstrategy-stopped-working-in-beta-16 On Sunday, May 8, 2016 at 2:48:35 PM UTC+2, Stefan Isidorovic wrote: > > Hi, > > I am developing app using .ts angular2 and have few issues related with > imports. > > I recently switched to

[AngularJS] Re: Angular2 with MVC5

2016-05-02 Thread Günter Zöchbauer
https://github.com/escardin/angular2-community-faq On Monday, May 2, 2016 at 4:41:18 PM UTC+2, Neeraj Sharma wrote: > > Hello Members, > > Can you please guide me I am going to use Angular2 with MVC5. Is good > with to start with angular2 ? > Can any one provide me a link regarding this > --

[AngularJS] Re: Angular 2 Roadmap/Planning

2016-05-02 Thread Günter Zöchbauer
Google doesn't provide any timelines. It's ready when it's ready. You have to decide yourself if a state is reached where you want to use it. If you depend on components being available that aren't yet then it's probably too early for you. I assume you are aware of the fact that Google is providi

[AngularJS] Re: ng2: Upgrading from beta 15 to 16 breaks?

2016-05-02 Thread Günter Zöchbauer
See http://stackoverflow.com/questions/36861628/location-and-hashlocationstrategy-stopped-working-in-beta-16 On Tuesday, April 26, 2016 at 11:25:24 PM UTC+2, Vern Jensen wrote: > > Upgrading from Angular beta 15 to 16, my app breaks with this console > error at startup: > > Error: Error: Token

[AngularJS] Re: angular2 wizard, is it possible to show multiple steps at the same time while they're configured for routing

2016-04-22 Thread Günter Zöchbauer
(made steps injectable) seem to re-create instances. > > On Thursday, April 21, 2016 at 7:19:31 AM UTC-5, Günter Zöchbauer wrote: >> >> I don't really understand your problem but you could route to a component >> that shows all your wizard steps in an *ngFor insi

[AngularJS] Re: Angular2 router : Changing route doesn't load the component for first time

2016-04-22 Thread Günter Zöchbauer
See also http://stackoverflow.com/questions/36767520/angular2-router-changing-route-doesnt-load-the-component-for-first-time On Thursday, April 21, 2016 at 1:20:00 PM UTC+2, vineet dev wrote: > > I am changing the route of angular2 application from '/' to '/xyz'. For > 'xyz' I have made a compo

[AngularJS] Re: angular2 wizard, is it possible to show multiple steps at the same time while they're configured for routing

2016-04-21 Thread Günter Zöchbauer
I don't really understand your problem but you could route to a component that shows all your wizard steps in an *ngFor inside a single component that you actually route to. http://stackoverflow.com/questions/36325212/angular-2-dynamic-tabs-with-user-click-chosen-components/36325468#36325468 c

[AngularJS] Re: Angular2 - Offer web component for others

2016-04-21 Thread Günter Zöchbauer
AFAIK the plan to use Angular to build web-components was dropped or at least postponed indefinitely. If you want to build reusable web components use Polymer (or similar) or plain JS On Wednesday, April 20, 2016 at 10:51:54 PM UTC+2, M. E. wrote: > > Hi everyone, > > as far as I understood, An

[AngularJS] Re: Angular2 - Unhandled Promise rejection: No provider for ElementRef

2016-04-20 Thread Günter Zöchbauer
adding `ElementRef` to `bindings` isn't necessary. There is something else wrong in your application. Some other hints: `bindings` is deprecated in favor of `providers` `@Inject(ElementRef)` is redundant if the parameter has a type annotation with the same type. Also this constructor does th

[AngularJS] Re: Angular2 dispatch DragEvent

2016-04-20 Thread Günter Zöchbauer
What about creating the event in plain JS without using Angulars DOM? On Monday, April 18, 2016 at 2:24:46 PM UTC+2, Michael Burger wrote: > > I need to dispatch and Create a new DragEvent > > > var dispatchedDragEvent = DOM.createEvent('DragEvent'); > > dispatchedDrag

[AngularJS] Re: [angular2] Differents behavior between Chrome and FireFox

2016-04-16 Thread Günter Zöchbauer
There are known issues with input elements that behave differently between browsers (broken in FF) There is no need to add directives : [ FORM_DIRECTIVES, NgForm, NgIf, NgFor ] they are available globally by default since a while On Friday, April 15, 2016 at 4:5

[AngularJS] Re: custom html component using the formbuilder in angular 2

2016-04-16 Thread Günter Zöchbauer
You need to create your own ControlValueAccessor or implement it in your component to make `ngModel` work with it. There should be several examples on SO already. On Friday, April 15, 2016 at 11:12:01 PM UTC+2,

[AngularJS] Re: Angular2 - Unhandled Promise rejection: No provider for ElementRef

2016-04-16 Thread Günter Zöchbauer
I don't see anything wrong. You can shorten the constructor to constructor(private elementRef: ElementRef){} (or `public` instead of `private`) Your problem is outside of the code your provided. Does your component not have a `template` or is this just because you shortened the code before

[AngularJS] Re: [angular 2] Is it necessary to dispose of Observable subscriptions in ngOnDestroy()?

2016-04-16 Thread Günter Zöchbauer
When the components class isn't referenced anywher anymore it will be garbage collected and your subscription with it (when no other class holds a reference to it) On Friday, April 15, 2016 at 6:07:41 PM UTC+2, Brian Kotek wrote: > > One thing that I'm not clear on is whether I'm required to man

[AngularJS] Re: Angularjs 2 + Typescript - Best way to learn

2016-04-12 Thread Günter Zöchbauer
honestly, you post a dozen questions here before trying once to find anything yourself On Monday, April 11, 2016 at 4:00:10 AM UTC+2, Hiren Modi wrote: > > Hi Guys, > > I am planning to develop a complex enterprise application on angularjs 2 + > typescript. > > Could you please help to me provid

[AngularJS] Re: Manage Multilayour/view in AngularJs 2 + Typescript.

2016-04-12 Thread Günter Zöchbauer
check out http://angular.io On Monday, April 11, 2016 at 3:00:21 AM UTC+2, Hiren Modi wrote: > > Hi Folks, > > I need your help to know how to refresh the multilayout view in angularjs > 2 + typescript. I have seen the google has implement the library called > Router to navigate in pages but don

[AngularJS] Re: Multiselect checkbox inside a Drop down List - Angularjs2 + Typescript

2016-04-12 Thread Günter Zöchbauer
Try http://google.com On Monday, April 11, 2016 at 2:55:04 AM UTC+2, Hiren Modi wrote: > > Hi Folks, > > Please help me to find the Multiselect checkbox inside a Drop down list > sample example in Angularjs 2 + typescript. > > Thanks, > Hiren > -- You received this message because you are subsc

[AngularJS] Re: Get dependency without constructor in Angular 2

2016-04-12 Thread Günter Zöchbauer
You can inject the `Injector` and request it from the injector with `this.injector.get(SomeDependency)` On Thursday, April 7, 2016 at 8:34:44 PM UTC+2, Dheeran wrote: > > In Angular 2, how to get services declared at bootstrap() from injector > without naming it in constructor of components. >

[AngularJS] Re: Angular2 HTML5 compliance

2016-04-07 Thread Günter Zöchbauer
How do you do that? Can you post a screenshot? On Wednesday, April 6, 2016 at 4:59:41 PM UTC+2, hani wrote: > > I'm not sure, i can see all those fancy tags in my browser and they seem > to be added directly in DOM. > > On Wednesday, April 6, 2016 at 5:19:08 AM UTC-5, Gü

Re: [AngularJS] Re: Angular2 HTML5 compliance

2016-04-07 Thread Günter Zöchbauer
t > *should* (and will) work since I did not find it in the documentation > > > > > > On 2016-04-06 12:19, Günter Zöchbauer wrote: > > You can use the long form > > >- #i="index">... > > See https://angular.io/docs/ts/late

[AngularJS] Re: dynamic providers and decorators in general.

2016-04-07 Thread Günter Zöchbauer
You can create a variable that contains them and then just add the variable. https://github.com/angular/angular/blob/master/modules/angular2/src/router/router_providers.ts#L31 Angular resolves nested arrays by itself, no need to spread. On Wednesday, April 6, 2016 at 2:56:43 PM UTC+2, massimi...

[AngularJS] Re: Angular2 HTML5 compliance

2016-04-06 Thread Günter Zöchbauer
You can use the long form - ... See https://angular.io/docs/ts/latest/api/common/NgFor-directive.html but how is that related to HTML5 compliance? Such markup will be processed by Angular before it is added to the DOM anyway. The DOM won't ever see any of Angulars *, [], (), or {{}} On Wed

[AngularJS] Re: Angular2 - Newbie question about Components & providers

2016-03-31 Thread Günter Zöchbauer
Where you add the service defines the scope of the service. `bootstrap(AppComponent, [SomeProviders])` makes them shared globally. @Component({ ... providers: [SomeProviders], ... }) export class SomeComponent {} make them shared between SomeComponent and all descendant components and directive

[AngularJS] Re: Angular2 remove/adding components

2016-03-31 Thread Günter Zöchbauer
Maybe loadNextToLocation instead of loadAsRoot allows you to reuse the target. On Thursday, March 31, 2016 at 1:00:52 AM UTC+2, Nicolas LARATTE wrote: > > Hi ! > > I begining to learn Angular2. I have succeeded to add a component on the > fly. > This component it's a popup which is used to login

[AngularJS] Re: Angular2: bootstraping all components/directives

2016-03-29 Thread Günter Zöchbauer
They are currently working on code generation. After a build step there won't be any DI and also no lookup, just generated code that calls `new Xxx()` or whatever needs to be done to get a service instance or directive/component instance. The work to lookup up providers and stuff is then only de

[AngularJS] Re: Angular 2: Using Component Input to Pass Nested Arrays

2016-03-25 Thread Günter Zöchbauer
That's a timing issue. `@Input() transport:Transport` doesn't yet have a value when Angular tries to evaluate the binding `transport.cars[0].electrics[1].name` the first time. `@Input() transport:Transport` is only set after `ngOnInit() { ... } To work around use the elvis operator transport?.c

[AngularJS] Re: Angular2, injecting constants

2016-03-25 Thread Günter Zöchbauer
If you get the error > Cannot find name 'YOUTUBE_API_KEY'". then probably something is expecting a `YOUTUBE_API_KEY`. This value is not used anyway in the code in your question. You export `testServiceInjectables` but prvide `youTubeServiceInjectables` You request `@Inject(TEST_API_KEY)` but

[AngularJS] Re: why can't i use as an angular2 component template

2016-03-23 Thread Günter Zöchbauer
is handled by Angular and not added to the DOM as element. inject it to the constructor constructor(private tmplRef:TemplateRef) for more details how to use it check out for example the source of `NgIf` in the Angular2 repo. On Tuesday, March 22, 2016 at 11:52:13 PM UTC+1, hani wrote: >

[AngularJS] Re: Angular 2, CORS

2016-03-19 Thread Günter Zöchbauer
you need to import it from `angular2/core` On Friday, March 18, 2016 at 1:24:43 PM UTC+1, Snorre Garmann wrote: > > This was very helpfull, but I'm having problems with the "provide()" > keyword. How did you make this compile? vs2015 complains with a "TS2304: > Cannot find name 'provide'" when I

[AngularJS] Re: Angular 2 ngFor slow for large data sets

2016-03-18 Thread Günter Zöchbauer
What browser? devMode/prodMode? IE is known to be very slow in devMode. On Tuesday, December 15, 2015 at 4:32:43 PM UTC+1, Carlos Esteban Lopez Jaramillo wrote: > > Hi, i have a simple list of names with 240 of them, the ngFor directive in > angular 2 tries to show them all at once which as you

[AngularJS] Re: Do I need to import 100's of Components?

2016-03-14 Thread Günter Zöchbauer
You can also create a file that exports components, then you only have to import this one file. By the way: Imports are not related to Angular. That's pure TypeScript. Imports are required for type checking and autocompletion and uniquely identify type names for building to JS. On Sunday, March

[AngularJS] Re: Angular 2 - Components are not loaded into router-outlet on apache server (with no errors)

2016-03-14 Thread Günter Zöchbauer
I guess http://stackoverflow.com/questions/31415052/angular-2-0-router-not-working-on-reloading-the-browser On Sunday, March 13, 2016 at 5:04:15 PM UTC+1, Tomas Katz wrote: > > Im developing an Angular 2 app and all is OK while using the lite-server > that is used in the official tutorials in th

[AngularJS] Re: Do I need to import 100's of Components?

2016-03-14 Thread Günter Zöchbauer
You need to import components where you use them. Usually you have a hierarchy of components where bigger components are composed of smaller components and even bigger components out of these, and so on. Usually you have a few imports in every component. If you want to build a gallery of all you

[AngularJS] Re: Why angular2 is written inTypescript ?

2016-03-14 Thread Günter Zöchbauer
I don't know Google closure but the Angular team wants to support TypeScript, Dart, and JavaScript. Generating reusable TypeScript and JavaScript libraries from Dart isn't ready yet. Otherwise I'm pretty sure they'd have used Dart. On Thursday, March 10, 2016 at 11:14:46 PM UTC+1, mohamed ame wr

[AngularJS] Re: ngClass does not bind in presence of *ngFor in Angular2 Typescript

2016-03-10 Thread Günter Zöchbauer
What do you mean by "is not helping"? Have you checked if the class is added in the DOM? On Thursday, March 10, 2016 at 9:00:28 AM UTC+1, Rully wrote: > > I am using a bootstrap table and trying to change the background color of > the row that I click. Trying to do this with ngClass based on a

[AngularJS] Re: NG2 - Best Practices :: Detecting changes on Input Property

2016-03-10 Thread Günter Zöchbauer
You can either implement the Angular2 lifecycle method `ngOnChanges(changes)` or make `@Input() mask: string;` a setter On Tuesday, March 8, 2016 at 10:11:40 PM UTC+1, Olivier Clément wrote: > > I have an attribute directive, that has an @Input property of the same > name as the directive (not

[AngularJS] Re: Why can not I create a query with the component containing content in NG2?

2016-03-06 Thread Günter Zöchbauer
http://plnkr.co/edit/bYLd7FFpoD8UsZjpLtXF?p=preview On Saturday, March 5, 2016 at 6:25:48 PM UTC+1, dudu bs wrote: > > http://plnkr.co/edit/OsO5G8o0D8UDU7PdDen8?p=info > > > Tanks... > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe

[AngularJS] Re: How can i write expression inside another expression

2016-03-01 Thread Günter Zöchbauer
Why would you need that? On Wednesday, March 2, 2016 at 8:11:22 AM UTC+1, Suresh Murthy wrote: > > How can i write expression inside another expression like > {{example{{example in angular js > -- You received this message because you are subscribed to the Google Groups "AngularJS" group.

[AngularJS] Re: Angular 2 - Send "this" as input to child component

2016-03-01 Thread Günter Zöchbauer
You can't use `this` in binding expressions but you can create a getter or function in your component that returns `this`. You can then use this getter or function in your binding expression. On Tuesday, March 1, 2016 at 5:36:55 AM UTC+1, Jason Connell wrote: > > Good evening, > > Is there a w

[AngularJS] Re: Search element in component context without using jQuery.

2016-02-29 Thread Günter Zöchbauer
http://stackoverflow.com/questions/34522306/angular-2-focus-on-newly-added-input-element On Friday, February 26, 2016 at 7:52:48 PM UTC+1, Eric Julien wrote: > > Ok I think it's a simple question but I didn't found ;/ > > So in a component I have an label and when I click on it I switch label to

[AngularJS] Re: AngularJS 2 - inner property data binding - EXCEPTION: TypeError: Cannot read property of undefined in

2016-02-28 Thread Günter Zöchbauer
Without reading all your code but seeing `approveBooking.cabBooking.bookingId` and `JSON` which is probably fetched from the server I guess you need approveBooking?.cabBooking.bookingId or approveBooking?.cabBooking?.bookingId This way `cabBooking` is only evaluated if `approveBookin

Re: [AngularJS] Re: [Angular 2] Bind 's attributes/classes

2016-02-27 Thread Günter Zöchbauer
https://github.com/angular/angular/issues/7303#issuecomment-189697783 On Sunday, February 28, 2016 at 5:38:09 AM UTC+1, Günter Zöchbauer wrote: > > If this approach works at all you can use a component for head that you > add to the template of each root component (html) and reuse t

Re: [AngularJS] Re: [Angular 2] Bind 's attributes/classes

2016-02-27 Thread Günter Zöchbauer
to do what I need. > > Yes, I currently use the "imperative" way (add classes OnInit and remove > the classes OnDestroy) but I again doubt that this is a recommended way to > do what I need. > > Or did I missed something? > -- > Radek > > > > On 201

[AngularJS] Re: [Angular 2] Bind 's attributes/classes

2016-02-26 Thread Günter Zöchbauer
I don't know if that works with ``. I have tried it successfully with ``. Therefore I guess it would work for `` as well. Not sure what you mean by: and copy the whole into each template of every such component? One root component should be enough. The layouts can be components in the r

[AngularJS] Re: angular directives and css reflow

2016-02-24 Thread Günter Zöchbauer
If you use `encapsulation: ViewEncapsulation.Native` (default is `Emulated`) on browsers that support it (most are there or nearly there AFAIK) then the browser can do lots of optimizations. This is the reason why the `/deep/`, `>>>`, and `::shadow` selectors were deprecated and will be removed

[AngularJS] Re: Component input/output or updating a service property

2016-02-22 Thread Günter Zöchbauer
Without reading your full explanation, I'd say use binding if possible, otherwise use a shared service. Binding is not possible when - the two components aren't direct parent/children - the component is added by the router - the component is added by DynamicComponentLoader If you share the data

[AngularJS] Re: Getting reference to component loaded by @RouteConfig

2016-02-22 Thread Günter Zöchbauer
It doesn't need to be app-wide. If you add a service class to providers of a component only this component and its descendants share an instance. (Don't add it to the providers of the descendants, otherwise they get their own instance instead of a shared one. On Tuesday, February 23, 2016 at 5:

[AngularJS] Re: Angular 2 - nested component inside an ngFor is copying data to each item in the list

2016-02-20 Thread Günter Zöchbauer
I guess what you want is Load Hero Details I added a #herodetails template variable to the element and use it in (click)="herodetails.GetHeroDetails()" to reference the .GetHeroDetails() in the herodetails component instead of the HeroListComponent (which would be default). On Frida

[AngularJS] Re: Angular 2.0 for a commercial application

2016-02-18 Thread Günter Zöchbauer
The release date will be made public on the release date. Google doesn't provide timelines. On Wednesday, February 17, 2016 at 5:32:47 PM UTC+1, Leonel Gayard wrote: > > It's almost a year since this last reply. > > The NPM package page shows version as 2.0.0-beta6, as I'm writing. > > I think it'

[AngularJS] Re: replace: true equivalent for Angular 2 components?

2016-02-18 Thread Günter Zöchbauer
Just us an attibute selector for your component then you can have a custom component that looks like On Wednesday, November 11, 2015 at 10:43:00 PM UTC+1, Ben McFerren wrote: > > Thnx for your response Sander > > I am sad to hear that it is deprecated and can supply a use case to > de

[AngularJS] Re: Angular 2 injected attribute

2016-02-18 Thread Günter Zöchbauer
By default Angular doesn't use shadow DOM (only when you set `encapsulation: ViewEncapsulation.Native` and the browser supports shadow DOM. I think there was an issue reported recently covering that problem. You can try if setting `ViewEncapsulation.None` gets rid of the `_ng_content...` class

[AngularJS] Re: Angular2: How can I intersperse a component between user components provided through ng-content

2016-02-17 Thread Günter Zöchbauer
No easy way. You can have a look at the `ngFor` implementation and `TemplateRef` On Friday, December 18, 2015 at 10:06:00 PM UTC+1, Corsen wrote: > > I can create a component like this pretty easily. > > @Component({ > selector: 'ui-foo', > template: ` > > > > ` > }) > expo

[AngularJS] Re: Angular2: Use Template-Variable within Component-Controller

2016-02-16 Thread Günter Zöchbauer
@ChildView('f') myForm; don't if it allows access to the form as you expect though. Maybe you want to define the form in code and then assign the form to the element. Don't know forms well enough yet to know how this works. On Tuesday, February 16, 2016 at 10:20:37 AM UTC+1, Manfred Steyer wrot

[AngularJS] Re: After upgrading to Angular2.beta6 getting "error TS2339: Property '...' does not exist on type ..."

2016-02-13 Thread Günter Zöchbauer
Check the Angular2 GitHub issues https://github.com/angular/angular On Friday, February 12, 2016 at 11:01:07 PM UTC+1, JG wrote: > > After upgrading to beta 6 I started getting error messages when > transpiling from TypeScript to ES5. It seem to affect ES6 methods of Array. > One example would b

[AngularJS] Re: With what technology is Angular 2 developed?

2016-02-13 Thread Günter Zöchbauer
That's not true. You seem to mix up TypeScript and Angular2. Microsoft wrote TypeScript. Google wrote AtScript and AtScript was dropped in favor of TypeScript. Microsoft was not involved in Angular2 development, at least not officially. On Saturday, February 13, 2016 at 9:50:13 AM UTC+1, Nagesh Dh

[AngularJS] Re: Angular 2 routing, what is the best practice for overriding routing decisions

2016-02-13 Thread Günter Zöchbauer
https://angular.io/docs/js/latest/api/router/CanActivate-var.html https://github.com/angular/angular/issues/4112 On Friday, February 12, 2016 at 7:17:45 PM UTC+1, Andy Macdonald wrote: > > Hi, > > I'm building an app that needs to redirect to a login view if the user is > not authenticated or the

[AngularJS] Re: With what technology is Angular 2 developed?

2016-02-12 Thread Günter Zöchbauer
What do you mean by "entirely written in TypeScript"? Does this include JS or not? What is "entirely" here. Is it the package/libraries it imports from 3rd party or not. What about build scripts, ... What about JS or Dart version of Angular. Does the question include about wether they are develop

[AngularJS] Re: $anchorScroll equivalent in Angular2 for Same page anchor navigation

2016-02-11 Thread Günter Zöchbauer
https://github.com/angular/angular/issues/4944 On Thursday, February 11, 2016 at 10:00:04 AM UTC+1, Jeetendra Kumawat wrote: > > Hi All, > > I am learning Angular2 since a month. I have used angular2 router in my > application and am using hash Location Strategy for Navigation in Angular > app

[AngularJS] Re: Angular2 instanciate a service in a service

2016-02-11 Thread Günter Zöchbauer
Angular2 doesn't support to register providers with the `@Injectable()` annotation, only for `@Component()`, `@Directive()`, and I think `@Pipe()` https://github.com/angular/angular/issues/5622 On Wednesday, February 10, 2016 at 8:00:48 PM UTC+1, Baptiste Legouix wrote: > > Hello, > > Why does An

[AngularJS] Re: Angular 2 Set Scroll

2016-02-07 Thread Günter Zöchbauer
what's the problem? You can add a template variable and then reference it from your components class @ViewChild('scrolling') scrolling: ElementRef; elementRef.nativeElement.scrollTo(...) On Wednesday, February 3, 2016 at 6:57:52 AM UTC+1, Eric Fulton wrote: > > I have a div with overflow-y s

[AngularJS] Re: Should I use Angular 2 for brand new App? What are the cons?

2016-02-06 Thread Günter Zöchbauer
There is something like ngUpgrade that allows to run Angular1 and Angular2 together. I haven't tried it myself yet tough and didn't even have a closer look. http://blog.thoughtram.io/angular/2015/10/24/upgrading-apps-to-angular-2-using-ngupgrade.html On Saturday, January 30, 2016 at 10:12:55 PM U

[AngularJS] Re: Need to add Custom header

2016-02-06 Thread Günter Zöchbauer
You need to fix that on the server like http://stackoverflow.com/questions/13146892/cors-access-control-allow-headers-wildcard-being-ignored On Saturday, February 6, 2016 at 5:03:24 AM UTC+1, venkatesh BS wrote: > > Hi All, > > I am trying to add the custom header to my http call, but when i do

[AngularJS] Re: inheritance dependency

2016-02-05 Thread Günter Zöchbauer
See also http://stackoverflow.com/questions/35206821/angular2-access-global-service-without-including-it-in-every-constructor/35207105#35207105 On Friday, February 5, 2016 at 12:16:48 PM UTC+1, Günter Zöchbauer wrote: > > I forgot to mention that I replaced `implements` by `extends` &g

[AngularJS] Re: inheritance dependency

2016-02-05 Thread Günter Zöchbauer
27;t avoid implementing the constructor in each subclass } } On Friday, February 5, 2016 at 12:14:02 PM UTC+1, Günter Zöchbauer wrote: > > class Oldman extends Person{ > constructor(massageService: MassageService){ // you can't avoid > implementing the constructor i

[AngularJS] Re: inheritance dependency

2016-02-05 Thread Günter Zöchbauer
class Oldman extends Person{ constructor(massageService: MassageService){ // you can't avoid implementing the constructor in each subclass super(messageService); // super must be first line in constructor } } On Friday, February 5, 2016 at 12:55:11 AM UTC+1, Long Field wrot

[AngularJS] Re: Execute function from drop down list box.

2016-02-01 Thread Günter Zöchbauer
I think you need to listen on the `` instead of on the `` and then read the `value` to do some action depending on the clicked item. On Monday, February 1, 2016 at 2:17:20 PM UTC+1, Lenin Muthu kumar wrote: > > hi all, > created drop down list box. in that if i click particular option >

[AngularJS] Re: run angular 2 app in a web worker

2016-02-01 Thread Günter Zöchbauer
https://github.com/angular/angular/pull/5932 (merged 5 days ago) The changelog does mention it, therefore it is probably not yet included in beta.2 On Sunday, January 31, 2016 at 11:12:44 PM UTC+1, de...@backlivelabs.com wrote: > > Hi Jason, attempting to port my angular 2 app over to using web

[AngularJS] Re: [Angular2] Access router-inserted component instance?

2016-01-30 Thread Günter Zöchbauer
just does: > > _simpleservice.parent_service = this; > > And my child components just do: > > _simpleservice.parent_service.someMethod(); > > It was very simple to code this up, but seems like a roundabout way to > discover the parent/child relationships as the r

[AngularJS] Re: How to get reference to a dom element (angular2-beta.1)

2016-01-30 Thread Günter Zöchbauer
elementRef.nativeElement.querySelector() should work Alternatively you can add a template variable and then use @ViewChild('someVar') myDiv; and Angular assigns a reference to the div to myDiv (initialized after ngAfterViewInit()) is done) On Friday, January 29, 2016 at 11:22:35 PM

[AngularJS] Re: Is single page approach advisable for bigger scalable sites

2016-01-30 Thread Günter Zöchbauer
Angular2 supports lazy loading of components (loaded on first use). > google is soon going to remove the crawling support for ajax-based websites (i.e. escaped_fragment part). I haven't heard about this (I wasn't involved in SEO since a while) but this might be in favor of HTML5 pushState wher

[AngularJS] Re: Roadmap to learn Angular 2 being new to MVC framework?

2016-01-30 Thread Günter Zöchbauer
https://angular.io/docs/ts/latest/ On Friday, January 29, 2016 at 5:21:48 PM UTC+1, Jorge Sanz Pérez wrote: > > I'm new in the MVC frameworks world and I want to know what learning > roadmap you recommend for Angular 2. > -- You received this message because you are subscribed to the Google Gr

[AngularJS] Re: Tour of Heroes chapters

2016-01-30 Thread Günter Zöchbauer
when they are ready On Thursday, January 28, 2016 at 1:16:28 PM UTC+1, Eddy Chehade wrote: > > Hi All, does anyone know when the remaining chapters of the Tour of Heroes > guide will be online? > > Thanks. > -- You received this message because you are subscribed to the Google Groups "AngularJ

[AngularJS] Re: Change UI Grid row color depending upon cell vale change

2016-01-30 Thread Günter Zöchbauer
Angular1 ng-class, ng-if Angular2 ngClass, ngIf On Thursday, January 28, 2016 at 7:09:34 AM UTC+1, Ritwik Das wrote: > > I am developing an app with PHP, MySQL and Angualr. Previously, that > application was in Visual Foxpro. It has a grid, which directly read and > update data from and to the

[AngularJS] Re: [Angular2] navigation through arrow keys

2016-01-30 Thread Günter Zöchbauer
You could add a template variable to the created rows and filter for these elements using `@ViewChildren('myVar') rows;` and then set focus on the previous/next item in the list on arrow up/down. On Wednesday, January 27, 2016 at 10:44:18 AM UTC+1, HansMeise wrote: > > I have a normal with fil

[AngularJS] Re: $eval equivalent in angular2

2016-01-30 Thread Günter Zöchbauer
I guess not. You might invoke the Angular compiler on the client for this but I haven't investigated this myself yet. It would't work well with server-side rendering and the upcoming server-side template compilation. On Tuesday, January 26, 2016 at 6:47:52 PM UTC+1, Josh Pendergrass wrote: > > w

[AngularJS] Re: How to conditionally hide/show elements in an list

2016-01-30 Thread Günter Zöchbauer
see also http://stackoverflow.com/questions/35100716/angular-2-two-structural-directives-on-the-same-dom-element On Tuesday, January 26, 2016 at 3:09:59 PM UTC+1, Chris Velevitch wrote: > > In an angular2 app, I want to conditionally hide/show list elements in a > unordered list. I'm trying to

[AngularJS] Re: Angular 2, CORS

2016-01-26 Thread Günter Zöchbauer
That's a server issue. On Tuesday, January 26, 2016 at 6:25:15 AM UTC+1, Sujith M A wrote: > > Hi..i am unable to send credentials anyone please help me and provide a >> sample code using cors. >> > i am new to angular2 so, so much of troubles. > Thanks in advance. > >> >> > -- You received

[AngularJS] Re: [Angular2] Access router-inserted component instance?

2016-01-26 Thread Günter Zöchbauer
Communication between parent and child work well with just binding. Otherwise use a shared service See http://stackoverflow.com/questions/34700438/global-events-in-angular-2 for an example On Monday, January 25, 2016 at 3:11:09 AM UTC+1, Chris Derossi wrote: > > I want to be able to communicate

[AngularJS] Re: Do interfaces work in AngularJS 2?

2016-01-23 Thread Günter Zöchbauer
http://stackoverflow.com/questions/32254952/binding-a-class-to-an-interface On Saturday, January 23, 2016 at 7:01:05 PM UTC+1, bocanegr...@gmail.com wrote: > Do interfaces really work? I tried creating one and created a variable whose > type is that interface. Now whatever value I assing to the v

[AngularJS] Re: Http in Dart?

2016-01-23 Thread Günter Zöchbauer
streaming. What > would be the best way to try to get this handled long term, submit an issue > report on github? > > On Friday, January 22, 2016 at 1:52:40 PM UTC-8, Günter Zöchbauer wrote: >> >> I built this code just to get tests running I ported from TypeScript to >>

[AngularJS] Re: Http in Dart?

2016-01-23 Thread Günter Zöchbauer
ave a suitable constructor might also work, but > HttpRequest in dart:html seems to be intended for a single request and > BrowserClient in package:http says it can't do streaming. What would be the > best way to try to get this handled long term, submit an issue report on > gi

[AngularJS] Re: Http in Dart?

2016-01-22 Thread Günter Zöchbauer
rovides a > bit more. > > On Friday, January 22, 2016 at 4:00:53 AM UTC-8, Günter Zöchbauer wrote: >> >> There is no Dart implementation for Http. You can just use what >> `dart:html` or `package:http` provide or create your own wrapper class if >> you want specif

[AngularJS] Re: Http in Dart?

2016-01-22 Thread Günter Zöchbauer
gular's dependency injection? I want to be able to > mock it in tests. > > > ...some quick googling says probably yes, I think. I'm new to Dart as well as > Angular2, looks like I should have explored what Dart itself provides a bit > more. > > On Friday, January

[AngularJS] Re: Http in Dart?

2016-01-22 Thread Günter Zöchbauer
There is no Dart implementation for Http. You can just use what `dart:html` or `package:http` provide or create your own wrapper class if you want specific functionality. On Friday, January 22, 2016 at 6:08:35 AM UTC+1, Douglas Miller wrote: > > The api docs say there's an angular2/http library

[AngularJS] Re: Angular 2 - DatePipe issue

2016-01-21 Thread Günter Zöchbauer
s > Jon > > On Thursday, 21 January 2016 12:48:02 UTC, Günter Zöchbauer wrote: >> >> You get this error if the value doesn't pass this check >> >> >> https://github.com/angular/angular/blob/5ba9ced1ab6540d9ad2e25f158355633a65adc4f/modules/angular2/src/co

[AngularJS] Re: Angular 2 - DatePipe issue

2016-01-21 Thread Günter Zöchbauer
You get this error if the value doesn't pass this check https://github.com/angular/angular/blob/5ba9ced1ab6540d9ad2e25f158355633a65adc4f/modules/angular2/src/common/pipes/date_pipe.ts#L121 supports(obj: any): boolean { return isDate(obj) || isNumber(obj); } isDate from https://github.com/angula

[AngularJS] Re: JavaScript Prime Numbers

2016-01-21 Thread Günter Zöchbauer
I'm struggling to see how this could be related to Angular ... On Thursday, January 21, 2016 at 4:03:33 AM UTC+1, Rohit Gayattri wrote: > > Hi, > > I have been generating prime numbers in JavaScript i want to return true > if it's a prime or false if it'not below is the code i am struggling with

[AngularJS] Re: Angular 2 - implementing my own dialogs?

2016-01-21 Thread Günter Zöchbauer
This might be helpful as example https://github.com/shlomiassaf/angular2-modal/blob/master/src/angular2-modal/providers/Modal.ts#L46 On Thursday, January 21, 2016 at 12:52:49 AM UTC+1, Cody Robinson wrote: > > I believe this is for angular 1 not angular 2 which wouldn't help in his > case. Have

[AngularJS] Re: Angular Material for multi-page application

2016-01-18 Thread Günter Zöchbauer
> Material, because I worry about application performance if I load it on > each page. > > On Monday, January 18, 2016 at 9:14:22 AM UTC+2, Günter Zöchbauer wrote: >> >> If you don't want to use Angular you can use MDL >> https://github.com/angular/angular/issue

[AngularJS] Re: Angular Material for multi-page application

2016-01-17 Thread Günter Zöchbauer
If you don't want to use Angular you can use MDL https://github.com/angular/angular/issues/4933 If you use Angular Material you have to use Angular anyway to configure and control the components. On Sunday, January 17, 2016 at 11:32:46 PM UTC+1, Sergei Struk wrote: > > I have usual multi-page pr

[AngularJS] Re: Angular 2 (beta.1) how to reset a FORM to UNTOUCHED state

2016-01-17 Thread Günter Zöchbauer
https://github.com/angular/angular/issues/4933 On Wednesday, January 13, 2016 at 7:56:28 PM UTC+1, JG wrote: > > I have a component, containing an HTML form. It is using "touched" and > "valid" properties to display error message. > > > class="form-error-message">required > > > When the form is s

[AngularJS] Re: [Angular2] Page reload breaks router

2016-01-15 Thread Günter Zöchbauer
y fixed the "Cannot GET ..." error > with redirecting all requests to the index.html"). > Nevertheless I also tried HashLocationStrategy, but this doesn't help for > my problem either :( > > Am Freitag, 15. Januar 2016 17:19:25 UTC+1 schrieb Günter Zöchbauer: >

[AngularJS] Re: [Angular2] Page reload breaks router

2016-01-15 Thread Günter Zöchbauer
See also https://ngmilk.rocks/2015/03/09/angularjs-html5-mode-or-pretty-urls-on-apache-using-htaccess/ -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+uns

[AngularJS] Re: [Angular2] Page reload breaks router

2016-01-15 Thread Günter Zöchbauer
That's a browser feature. Angular by default uses HTML5 pushstate (PathLocationStrategy in Angular slang). You either need a server that processes all requests like it were requesting `index.html` or you switch to `HashLocationStrategy` (with # in the URL for routes) https://angular.io/docs/js/

Re: [AngularJS] Re: Angular 2 - Leading underscore for private members

2016-01-15 Thread Günter Zöchbauer
ript instead. > > 2016-01-15 10:14 GMT+01:00 Günter Zöchbauer >: > >> In Dart the leading underscore has private semantics (like lower-case in >> Go). >> I guess it's easier to translate TS to Dart and some like it anyway as >> convention. >> &

[AngularJS] Re: Angular2: Binding values to non-Angular attributes

2016-01-15 Thread Günter Zöchbauer
Why do you apologize for code sections? I'm not aware of any issues with them. To your question: to bind to attributes instead of properties use attr.data-slide="{{i}}" or [attr.data-slide]="i" On Friday, January 15, 2016 at 8:30:36 AM UTC+1, julianhe...@yahoo.de wrote: > > PS: Sorry for

[AngularJS] Re: Angular 2 - Leading underscore for private members

2016-01-15 Thread Günter Zöchbauer
In Dart the leading underscore has private semantics (like lower-case in Go). I guess it's easier to translate TS to Dart and some like it anyway as convention. On Thursday, January 14, 2016 at 3:49:27 PM UTC+1, nucl3ar wrote: > > Hi, > > I'm looking for a naming convention for Angular 2 but co

  1   2   >