Re: [AngularJS] Wait till http get response loaded to model

2016-06-11 Thread 'Lucas Lacroix' via AngularJS
Wrap it in a template that prevents the ngFor from being executed until the member has a value: wrote: > Hi, > > i've got a problem: i'm getting some data with http and want to display > them on my view. But i always get the error "Uncaught EXCEPTION: Error in >

Re: [AngularJS] How to implement WebRTC using Angular 2

2016-06-13 Thread 'Lucas Lacroix' via AngularJS
You still haven't said what the issue you're seeing is. On Mon, Jun 13, 2016 at 10:50 AM, Do Giang wrote: > Oh I post wrong code and try to delete it. This one is my code: > I try the demo from this site: https://simplewebrtc.com > > import {Component,OnInit} from

Re: [AngularJS] How to implement WebRTC using Angular 2

2016-06-13 Thread 'Lucas Lacroix' via AngularJS
PS - looking at the typings definitions for webrtc (not SimpleWebRTC), it looks like everything is global and not part of a module. Maybe SimpleWebRTC has the same issue, in which case, you would need to add the script to the head section of your HTML and then reference the global SimpleWebRTC

Re: [AngularJS] How to implement WebRTC using Angular 2

2016-06-13 Thread 'Lucas Lacroix' via AngularJS
Based purely on a guess, it looks like SimpleWebRTC.js is not using a compatible package system. This would explain why the this.webrtc member is different from what you'd expect of an instance of the SimpleWebRTC class. For example, if your tsconfig.json says "module: system" and SimpleWebRTC

Re: [AngularJS] How to implement WebRTC using Angular 2

2016-06-13 Thread 'Lucas Lacroix' via AngularJS
Could you give some details on the issue you're seeing? On Mon, Jun 13, 2016 at 10:44 AM, Do Giang wrote: > I and my team decide to build our capstone project using NodeJS, Angular 2 > and WebRTC. Now we have a problem that we can't use WebRTC Libraries in the > Angular 2

Re: [AngularJS] Angular2 Release Candidate Router 2.0.0-rc.1 history navigation broken

2016-06-08 Thread 'Lucas Lacroix' via AngularJS
I am using the HashLocationStrategy in one of my apps. I specifically tested this out and it worked normally. On Wed, Jun 8, 2016 at 10:05 AM, Jeff Schwartz wrote: > It appears that history navigation via browser's history back/forward > buttons is broken in this

Re: [AngularJS] Angular2 Release Candidate Router 2.0.0-rc.1 history navigation broken

2016-06-08 Thread 'Lucas Lacroix' via AngularJS
PS - using Chrome for all my testing and I'm not even bothering with others at this time. On Wed, Jun 8, 2016 at 10:06 AM, Lucas Lacroix wrote: > I am using the HashLocationStrategy in one of my apps. I specifically > tested this out and it worked normally. > > On Wed,

Re: [AngularJS] Angular2 Release Candidate Router 2.0.0-rc.1 history navigation broken

2016-06-08 Thread 'Lucas Lacroix' via AngularJS
I just re-tested. The back button works, the forward button does not - it is always low-lit. I'm going to test this using a simple web-page and hashes to confirm the issue is Angular and not the browser. On Wed, Jun 8, 2016 at 10:18 AM, Jeff Schwartz wrote: > I'm also

Re: [AngularJS] Angular2 Release Candidate Router 2.0.0-rc.1 history navigation broken

2016-06-08 Thread 'Lucas Lacroix' via AngularJS
No. I can only go back once. Then the back button does nothing - you're just stuck. On Wed, Jun 8, 2016 at 10:27 AM, Jeff Schwartz wrote: > Yes, I am also experiencing a permanently disabled forward button. In your > test, are you able to navigate backwards through the

Re: [AngularJS] Angular2 Release Candidate Router 2.0.0-rc.1 history navigation broken

2016-06-08 Thread 'Lucas Lacroix' via AngularJS
I think so. When you open it, let me know the issue# so I can comment as well. On Wed, Jun 8, 2016 at 10:43 AM, Jeff Schwartz wrote: > Exactly and thanks for confirming that I am not exclusively experiencing > these issues :). Is it appropriate to file this issue on

[AngularJS] Router.navigate not URI encoding arguments

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
I wanted to get some opinions before reporting this as a bug/enhancement. This is using the RC1 router and not the deprecated beta router. I am using the the HashLocationStrategy because the default strategy does not work for our server. Setting up the equivalent routing on the server is not

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
The quick start guide already describes using the "lite-server" npm module and live-reload. The angular-cli has a similar concept (might even be the same implementation). On Wed, Jun 1, 2016 at 3:01 PM,

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
I believe you will run in to issues with CORS. Modules are loaded via Ajax, so unless you are compiling everything in to one big JS file which is referenced by your index.html, then it will fail (pretty sure). Is there a reason why you do not want a server? On Wed, Jun 1, 2016 at 3:42 PM, Mikhail

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
I don't know anything about "Spring", so I don't know why you would want to evade the server when it's already included. You can use webpack or angular-cli to package up your entire project as one or two JS files which you can reference from your index.html. That MIGHT work. On Wed, Jun 1, 2016

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
My mistake again. "start":"webpack -w", On Wed, Jun 1, 2016 at 6:05 PM, Mikhail A. Safronov wrote: > thanks for prompt, fixed redundant spaces. > but.. > npm ERR! code ELIFECYCLE > npm ERR! angular2-quickstart@1.0.0 start: `webpack:w` > npm ERR! Exit status 1 > npm

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
You must be running an old version of node. Like it says in the error, you need to enable strict mode. You do that by adding "use strict"; (with quotes and semicolon) to the top of the file. On Wed, Jun 1, 2016, 18:12 Mikhail A. Safronov wrote: > >

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
Yep. It's watching for file changes and if anything changes, it will automatically recompile. Now you need to reference the two files in your index.html (vendor.js first!) and you should be good. On Wed, Jun 1, 2016, 18:43 Michael wrote: > i added "use strict" to

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
Remove all but the vendor and main scripts (though I thought you said it was "app" not main?). The vendor script must come first. On Wed, Jun 1, 2016, 18:55 Michael wrote: > now index looks like this. > scripts from js-folder were from initial index.html with

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
>From here on, you're going to need to rely on the browsers developer console. My guess would be the scripts are in a location that your server will serve from. You might have to copy them to another folder. On Wed, Jun 1, 2016, 19:04 Michael wrote: > it was an initial

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
Send your tsconfig. On Wed, Jun 1, 2016, 17:35 Mikhail A. Safronov wrote: > i did everything, but have this error: > npm ERR! Unexpected token '​' at 6:27 > npm ERR! "start": "​webpack:w",​ > > среда, 1 июня 2016 г., 15:37:26 UTC-5 пользователь Lucas Lacroix

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
http://jsonlint.com/ On Wed, Jun 1, 2016 at 5:52 PM, Mikhail A. Safronov wrote: > a linter? sorry .. > > среда, 1 июня 2016 г., 16:49:05 UTC-5 пользователь Lucas Lacroix написал: >> >> I don't see the error in your package.json that npm is complaining about. >> Try

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
I don't see the error in your package.json that npm is complaining about. Try putting it through a linter. On Wed, Jun 1, 2016 at 5:47 PM, Mikhail A. Safronov wrote: > my app.ts file (bootstrap file) is inside of folder app, which is located > inside project root. > so

Re: [AngularJS] How to launch Angular 2 application without ANY server

2016-06-01 Thread 'Lucas Lacroix' via AngularJS
Sorry... I meant package.json. On Wed, Jun 1, 2016, 17:42 Mikhail A. Safronov wrote: > { > "compilerOptions": { > "target": "es5", > "module": "commonjs", > "moduleResolution": "node", > "sourceMap": true, > "emitDecoratorMetadata": true, >

Re: [AngularJS] Data model difficulties

2016-06-27 Thread 'Lucas Lacroix' via AngularJS
We have had similar conversations in my current project. We came up with the concept of an "aggregate" API, which is, actually, very akin to graphQL/Falcor. Essentially, the client already knows about the relationships between objects and can issue a single call to a special API which will

Re: [AngularJS] Deep linking with route param fails

2016-06-27 Thread 'Lucas Lacroix' via AngularJS
What does the app.js URL look like when you got to "/homedetail/"? On Mon, Jun 27, 2016 at 11:21 AM, HisDivineShadow < buddy.ackerman...@gmail.com> wrote: > It does do that, that is what the {*url} parameter is doing. The error > shown is in SystemJS which wouldn't be getting loaded if the MVC

Re: [AngularJS] Deep linking with route param fails

2016-06-27 Thread 'Lucas Lacroix' via AngularJS
The previous, now depracted, RC1 router specified that you had to have a "" element in your HTML like this: > > > > > ... Does the V3 router not have a similar requirement? If it does not, then I see know way for Angular to magically know how to construct the URLs correctly (ie. not

Re: [AngularJS] Unable to start npm

2016-07-13 Thread 'Lucas Lacroix' via AngularJS
Actually... Lite-server should choose a random port... Please send over your package.json. On Wed, Jul 13, 2016 at 12:58 PM, Lucas Lacroix wrote: > It looks like you already have a web-server running (you're in the xampp > folder, after all). My guess is that lite-server

Re: [AngularJS] Unable to start npm

2016-07-13 Thread 'Lucas Lacroix' via AngularJS
It looks like you already have a web-server running (you're in the xampp folder, after all). My guess is that lite-server fails to start. Try removing that from the start script in your package.json. If that doesn't work (or you are confused), attach your package.json to your reply. On Wed, Jul

Re: [AngularJS] Own mapping like '@angular' = 'node_modules/@angular',

2016-07-13 Thread 'Lucas Lacroix' via AngularJS
No. Typescript knows nothing about scopes. It merely searches in node_modules for a FOLDER '@angular/core' (or whatever package you're referencing). There is nothing special Typescript needs to do. On Wed, Jul 13, 2016 at 11:47 AM, 'breaddes' via AngularJS < angular@googlegroups.com> wrote: >

Re: [AngularJS] Unable to start npm

2016-07-13 Thread 'Lucas Lacroix' via AngularJS
The package.json looks correct. The exit status indicates that it cannot find the command. As I do not see the output from tsc, I would guess that it is the command that is missing. Try running "npm i" and then try "npm start" again from your project root. On Wed, Jul 13, 2016 at 1:05 PM, Dawg

Re: [AngularJS] Own mapping like '@angular' = 'node_modules/@angular',

2016-07-13 Thread 'Lucas Lacroix' via AngularJS
I'm not sure I understand your use case. It seems like you want to use one URL for '@angular/core' if a parameter has a particular value and a different URL if it has another. Is that what you're trying to do? On Wed, Jul 13, 2016 at 11:49 AM, Lucas Lacroix wrote: > No.

Re: [AngularJS] Own mapping like '@angular' = 'node_modules/@angular',

2016-07-13 Thread 'Lucas Lacroix' via AngularJS
I would not suggest this specifically for the reason that you will not be able to package up your application using WebPack or SystemJS builder, meaning that your application, if it has a lot of modules/resources, could be VERY slow to load, especially so if a device has a fairly limited cache

Re: [AngularJS] Provide router as promise

2016-07-14 Thread 'Lucas Lacroix' via AngularJS
Put the call to boostrap inside the promise: routeConfig.then((conf) => { bootstrap(AppComponent,[ provideRouter(conf) ]); }); On Thu, Jul 14, 2016 at 9:38 AM, 'breaddes' via AngularJS < angular@googlegroups.com> wrote: > This is how I provide the router settings for my

Re: [AngularJS] Delay on input (keyup) in order to request server

2016-07-14 Thread 'Lucas Lacroix' via AngularJS
Right... Because you're not scoping correctly. Within a function, even a IIFE, the 'this' pointer is different from the enclosing scope. Example: class TestClass { someFunc() { // 'this' references an instance of TestClass, so this will work: this.otherFunc();

Re: [AngularJS] Delay on input (keyup) in order to request server

2016-07-14 Thread 'Lucas Lacroix' via AngularJS
Then use the standard Javascript setTimeout function. On Thu, Jul 14, 2016 at 6:27 AM, Simon Azzopardi < simon.azzopa...@casasoft.com.mt> wrote: > Hi Lucas, > > I need to store the string in another value to be passed to ag-grid. > > All I want just to timeout the keyup... > > On Thursday, July

Re: [AngularJS] cannot find module '@angular/core'?

2016-07-22 Thread 'Lucas Lacroix' via AngularJS
I think "angular2" is the old beta/alpha. All the angular2 modules are in the @angular scope and need to be installed individually. I think this happened when rc0 was released. npm i @angular/core --save npm i @angular/http --save There is no longer one large angular2 package. On Fri, Jul 22,

Re: [AngularJS] 404: '@angular/src' is not in the npm registry?

2016-07-22 Thread 'Lucas Lacroix' via AngularJS
That is not an angular module that I am aware of. If you've followed the Angular2 tutorial , you should have these dependencies in your package.json: @angular/common @angular/compiler @angular/core @angular/forms @angular/http @angular/platform-browser

Re: [AngularJS] Ordering Imports

2016-07-22 Thread 'Lucas Lacroix' via AngularJS
This section says it all: https://angular.io/docs/ts/latest/guide/style-guide.html#!#03-06 Order your import statements alphabetically by module name. So, your 'import ... "./heroes";' line should come after your 'import ... "./equipment";' line. Order the destructured imported assets within

Re: [AngularJS] Insert plain HTML into template

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
This should work: On Mon, Jul 25, 2016 at 11:00 AM, Alex Lavrik wrote: > I need to insert plain HTML which I receive from $http.get() into my > template as HTML tags like jQuery inserts plain HTML into DOM as tags. > > Conroller code: > var onLoadUrl = function( data ){

Re: [AngularJS] general architectural name for angular services?

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
IMO, just call it a "Service". The fact that the service uses another down-stream service is not something that caller need worry about. The caller should not need to worry about the implementation details of the service and making the name specific to the implementation means that it would be

Re: [AngularJS] how to reload/refresh the component view forcefully?

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
Change the values of the sampleData object instead of swapping out the sampleData object: public LoadExtractorQueueDetails() { console.log("in LoadExtractorQueueDetails of ExtractorQueueDetails"); this.sampleData.queueId = 456; this.sampleData.name = "Krishnan123" ;

Re: [AngularJS] Re: Property 'toPromise' does not exist on type 'Observable'. any

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
If you are not importing 'rxjs/all', then the Rxjs package is modularized and you need to "add in" each function you want. I suggest you do NOT import the 'all' module as this will bloat your application significantly. Example: import {Observable} from 'rxjs/Observable'; import

Re: [AngularJS] Clear Documentation for angular2 for plain javascript / es5

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
Did you load/import the appropriate package that contains the Router classes? In other words:

Re: [AngularJS] Re: Property 'toPromise' does not exist on type 'Observable'. any

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
Sorry... Missed the part where you're already doing that. Try trapping out the Observable class (this works in Chrome, and maybe Firefox): console.log('%O', Observable); -Luke On Mon, Jul 25, 2016 at 9:22 AM, Lucas Lacroix wrote: > If you are not importing 'rxjs/all',

Re: [AngularJS] Re: Property 'toPromise' does not exist on type 'Observable'. any

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
PS - you should NOT import 'rxjs/Rx' as your application will be bloated. On Mon, Jul 25, 2016 at 9:24 AM, Lucas Lacroix wrote: > Sorry... Missed the part where you're already doing that. > > Try trapping out the Observable class (this works in Chrome, and maybe >

Re: [AngularJS] Issues in binding dynamic json to input controls

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
If you are replacing the value of resultData, the input has no way to detect that because it is bound to the old object's queueId member which has NOT changed. The control does not bind to the component's resultData member. My suggestion is to either A) apply the updates to the resultData object

Re: [AngularJS] 404: '@angular/src' is not in the npm registry?

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
That is the beta and is before angular2 was modularized. If you're using one of the RCs (hopefully, the latest), then you need to pull in each module as needed. On Mon, Jul 25, 2016 at 1:44 PM, Randy Gamage wrote: > I have noticed some Visual Studio example projects reference

Re: [AngularJS] Angular/2 Component Router : Capture query parameters

2016-07-28 Thread 'Lucas Lacroix' via AngularJS
It looks like this might be a consequence of using the hash location strategy. On Thu, Jul 28, 2016, 11:16 'Charles Jackson' via AngularJS < angular@googlegroups.com> wrote: > Hi, > > I'm struggling with the new component router. I'm using the oAuth API on > twitter which redirects back to my

Re: [AngularJS] Angular/2 Component Router : Capture query parameters

2016-07-28 Thread 'Lucas Lacroix' via AngularJS
Sorry... Hit send too soon. Try having your Oauth redirect Uri include the "#/". On Thu, Jul 28, 2016, 11:28 Lucas Lacroix wrote: > It looks like this might be a consequence of using the hash location > strategy. > > On Thu, Jul 28, 2016, 11:16 'Charles Jackson' via

Re: [AngularJS] xml to json with observable

2016-07-29 Thread 'Lucas Lacroix' via AngularJS
The console.log is executed before the asynchronous operation (ie. ".subscribe") invokes the callbacks. On Fri, Jul 29, 2016 at 11:18 AM, Josh Restivo wrote: > I've tried various incarnations of the following function and can't get > 'this.entries' to return with any

Re: [AngularJS] Angular 2: XMLHttpRequest cannot load

2016-07-29 Thread 'Lucas Lacroix' via AngularJS
Is the page being served from the same port and host? This error seems to say that the server doesn't support CORS and you tried to request a resource from a different server. Note: in order for CORS to not be in effect, your request must match the protocol, hostname, and port of the page making

Re: [AngularJS] Re: Clear Documentation for angular2 for plain javascript / es5

2016-07-26 Thread 'Lucas Lacroix' via AngularJS
It sounds like you're missing a polyfill or library. What scripts are you pulling in? On Tue, Jul 26, 2016 at 2:08 AM, Venkata Chakradhar < venkatachakrad...@gmail.com> wrote: > > I loaded this file > "~/.bin/node_modules/@angular/router/bundles/router.umd.js", which covers > routing and

Re: [AngularJS] Re: Clear Documentation for angular2 for plain javascript / es5

2016-07-26 Thread 'Lucas Lacroix' via AngularJS
The core-js library should provide all the polyfills you need. I would suggest creating a plunkr to reproduce the issue. Otherwise, there is nothing else to go on here. I don't write Javascript anymore. Typescript (or any other transpiler) has far too many benefits to write vanilla JS, IMO.

Re: [AngularJS] how to reload/refresh the component view forcefully?

2016-07-25 Thread 'Lucas Lacroix' via AngularJS
Try to reproduce the issue on plunkr. If you can, link the plunkr here. On Mon, Jul 25, 2016, 12:03 Navaneetha Krishnan S wrote: > Luke, > I tried with this, still it is not working. any other ideas? > I tried writing the changes object values into the console.log - I can

Re: [AngularJS] ng-pattern not working

2016-07-26 Thread 'Lucas Lacroix' via AngularJS
This seems like an issue with regex. I would try out a service like this: https://regex101.com/ On Tue, Jul 26, 2016 at 10:54 AM, Rajan Singh wrote: > Hi, > > I have pattern which is /^\w(?:(?![ \\.']{2,})[\w \\.'])*/. It is for > name which starts with words &

Re: [AngularJS] Re: ng-pattern not working

2016-07-26 Thread 'Lucas Lacroix' via AngularJS
In Angular2, there is a PatternValidator directive. Not sure if there is an equivalent directive for Angular1. Sorry I can't be of more help. On Tue, Jul 26, 2016 at 12:45 PM, Rajan Singh wrote: > I have already verified regex on http://regexr.com/ & now verified on >

Re: [AngularJS] ng2: iterate over object and display its keys...

2016-07-30 Thread 'Lucas Lacroix' via AngularJS
Use a function that returns Object.keys to enumerate the keys. That's what I've done. On Sat, Jul 30, 2016, 10:14 p. stephen w wrote: > ngFor only works on arrays and iterables - github-angular-issues >

Re: [AngularJS] Angular JWT => set header

2016-07-31 Thread 'Lucas Lacroix' via AngularJS
That header needs to be set by the server you're attempting to get the resource from. It's not something you set in the request. Basically, your browser does sends HTTP OPTIONS request to the server is expects it to return this header. This is what it means when it says "preflight request". Most

Re: [AngularJS] Angular 2 Http with promise issue

2016-07-31 Thread 'Lucas Lacroix' via AngularJS
You're callback does not include the console statement. It should be something like this: .then(user => { // all code that is waiting for the response goes here }) On Sun, Jul 31, 2016, 13:53 wrote: > i am try to create a login app using angular 2 http with promise. > >

Re: [AngularJS] Rxjs filter operator not working with Angular2 Observable

2016-07-27 Thread 'Lucas Lacroix' via AngularJS
It looks like x is an array, not an object. So... I think you need to: .map(x => { return x.filter(y => y.type === 'member'); }) On Wed, Jul 27, 2016 at 4:26 PM, T wrote: > up vote0down votefavorite >

Re: [AngularJS] AngularJS 2 - Debug in Chrome

2016-08-02 Thread 'Lucas Lacroix' via AngularJS
That is absolutely correct. The code at line 32 is a callback that is invoked asynchronously. Line 44 will always be hit first. On Tue, Aug 2, 2016 at 11:42 AM, Rafael Gouveia da silva < desenvolvedorraf...@gmail.com> wrote: > >

Re: [AngularJS] AngularJS 2 - Debug in Chrome

2016-08-02 Thread 'Lucas Lacroix' via AngularJS
I think you want to do something like this: return new Observable((observer: Observer) => { this.http.post(...) .map(res => res.json()) .do((data) => { ... all that code in the callback goes here ... }) .map((data) => data.token)

Re: [AngularJS] Re: Can't bind to 'ngModel' since it isn't a known property of 'input'

2016-08-10 Thread 'Lucas Lacroix' via AngularJS
​I believe you're missing the directive for NgModel on your component.​ On Wed, Aug 10, 2016 at 2:41 PM, Eduardo Cavalcanti < eduardo.m.cavalca...@uol.com.br> wrote: > This is the error message: > > "Template parse errors: Can't bind to 'ngModel' since it isn't a known > property of 'input'. ("

Re: [AngularJS] Something wrong or just me?

2016-08-12 Thread 'Lucas Lacroix' via AngularJS
You should use WebPack or SystemJSBuilder to pack up your production files. On Fri, Aug 12, 2016, 18:45 Dave Abbott wrote: > > > I am trying to

Re: [AngularJS] Calling an parts of an angular app from another

2016-08-12 Thread 'Lucas Lacroix' via AngularJS
If your app's code exists in the same location, you can share components between the pages without issue, even when using WebPack or other bundling software. An alternative to that is to publish the shared components in NPM and install them in each appliction - this is the route we are currently

Re: [AngularJS] Re: Something wrong or just me?

2016-08-12 Thread 'Lucas Lacroix' via AngularJS
Hi Dave, Google is your friend: https://angular.io/docs/ts/latest/guide/webpack.html On Fri, Aug 12, 2016, 22:17 Dave Abbott wrote: > Thanks for the advise, but how would I go about that? Is there a guide / > tutorial or some starting reference point to get me going? > > >

Re: [AngularJS] NG2: dynamic input types, i.e: checkbox, radio, or text...

2016-08-13 Thread 'Lucas Lacroix' via AngularJS
Did you try using a binding? (type)="q.type" On Sat, Aug 13, 2016, 15:50 p. stephen w wrote: > I can't dynamically set the input type, like so... > [(ngModel)]="ng2Form[q.id +'_'+ a.id]" > name="q.id" > value="a.score"/> > > Per thforis

Re: [AngularJS] NG2: dynamic input types, i.e: checkbox, radio, or text...

2016-08-13 Thread 'Lucas Lacroix' via AngularJS
Sorry... Those should be square brackets, I think. On Sat, Aug 13, 2016, 16:07 Lucas Lacroix wrote: > Did you try using a binding? > (type)="q.type" > > On Sat, Aug 13, 2016, 15:50 p. stephen w wrote: > >> I can't dynamically set the input type,

Re: [AngularJS] Angular 2 with webpack Getting "Uncaught ReferenceError: System is not defined" following angular 2 webpack doc

2016-08-12 Thread 'Lucas Lacroix' via AngularJS
I have not had this issue and I am using WebPack with the latest RC. If the issue is occurring within your own modules, double check that your tsconfig.json file has "module": "commonjs". Otherwise, some external module must not have the correct variation for the WebPack loader. Not sure what you

Re: [AngularJS] Delay on input (keyup) in order to request server

2016-07-14 Thread 'Lucas Lacroix' via AngularJS
Take a look at ng2-bootstrap. It already has a typeahead component which should do what you want: http://valor-software.com/ng2-bootstrap/#/typeahead On Thu, Jul 14, 2016 at 6:05 AM, Simon Azzopardi < simon.azzopa...@casasoft.com.mt> wrote: > Hi guys, > > Does anyone can give some help on how to

Re: [AngularJS] How get id value from array and save using $hhtp in a controller ?

2016-07-21 Thread 'Lucas Lacroix' via AngularJS
What do you mean "save"? Could you give some example code of what you are trying to do? On Thu, Jul 21, 2016 at 9:14 AM, Marcelo Rodrigues Castelo Branco < marcelorcastelobra...@gmail.com> wrote: > Hello! I have the following question : How do I save the value of an id that > is in this array [

Re: [AngularJS] Ordering Imports

2016-07-21 Thread 'Lucas Lacroix' via AngularJS
You can order the imports in any way you want. On Thu, Jul 21, 2016 at 6:02 AM, Supun Budhajeewa wrote: > I used to order C#'s "using"s and PHP's "use"s in the alphabetical order. > > It worked well because one "use/using" statement imported one class or > namespace. > >

Re: [AngularJS] Ordering Imports

2016-07-21 Thread 'Lucas Lacroix' via AngularJS
I do not believe there are any best practices - Google turns up nothing and if it's not in Google, it doesn't exist (a little humor there). The ordering of the imports has no effect on the application and, IMO, it does not increase readability/understanding when you enforce an arbitrary sort on

Re: [AngularJS] ng2: ngIf on object keys, undefined error...

2016-07-17 Thread 'Lucas Lacroix' via AngularJS
Where is "myObj" defined? On Sun, Jul 17, 2016, 14:17 p. stephen w wrote: > This line produces an error on 'myObj': >Cannot read property 'mykey' of undefined. > woot > > It sounds like NG2 will not iterate over objects, and the

Re: [AngularJS] ng2: ngIf on object keys, undefined error...

2016-07-17 Thread 'Lucas Lacroix' via AngularJS
Next question: why are you using the square bracket notation? Why not: myObj.mykey? Also Are you sure you've initialized myObj? On Sun, Jul 17, 2016, 15:10 p. stephen w wrote: > Its defined on the component. > > works as expected. > woot > > > On Sunday, July 17,

Re: [AngularJS] Re: ng2: ngIf on object keys, undefined error...

2016-07-19 Thread 'Lucas Lacroix' via AngularJS
This is not Angular. This is just Javascript and you cannot get the member (or subscript) of something that is null or undefined. On Tue, Jul 19, 2016 at 8:42 AM, p. stephen w wrote: > Ah, that does work, even on a deeper object: > *ngIf="myA.myB &&

Re: [AngularJS] Re: ng2: ngIf on object keys, undefined error...

2016-07-19 Thread 'Lucas Lacroix' via AngularJS
If "myA.myB" is undefined or null, then "myA.myB[subscript]" will throw an exception. This is simple Javascript programming and not anything to do with Angular. Although Angular *could* cover the possibility of referencing undefined variables or members in bound logic, doing so could hide bad

Re: [AngularJS] Re: Initialise form from asynchronous observable

2016-07-19 Thread 'Lucas Lacroix' via AngularJS
There is also an async pipe available that allows you to pipe in an observable: https://angular.io/docs/ts/latest/guide/pipes.html Not sure if it's applicable to your example. On Tue, Jul 19, 2016 at 11:19 AM, Michael Battcock wrote: > Hi Sander, > > Thanks for the tip!

Re: [AngularJS] Angular CLI Scripting Recommendation

2016-07-19 Thread 'Lucas Lacroix' via AngularJS
Why not use node? That is what we've switched over to. On Tue, Jul 19, 2016 at 1:52 PM, Ed Sinek wrote: > I'm playing around with Angular CLI (on Windows 7) and want to create a > script to generate the app, several components, routes, etc. Since I'm in > Windows, the low

Re: [AngularJS] Angular CLI Scripting Recommendation

2016-07-19 Thread 'Lucas Lacroix' via AngularJS
Most of what we were scripting could be done without emulating the shell capabilities of Bash, so we did not use shelljs. We merely used the Child Process module to invoke individual command lines. Example: > ​import * as ChildProcess from

Re: [AngularJS] Data model difficulties

2016-06-28 Thread 'Lucas Lacroix' via AngularJS
blem if my application is pretty > much a 1:1 between states and specific actions? > > > On Jun 27, 2016, at 3:30 PM, 'Lucas Lacroix' via AngularJS < > angular@googlegroups.com> wrote: > > We have had similar conversations in my current project. > > We came up

Re: [AngularJS] [angular2] hosting on s3

2016-06-28 Thread 'Lucas Lacroix' via AngularJS
You should use webpack or SystemJS builder so that all of the required node_modules are built into a single file. On Tue, Jun 28, 2016 at 11:32 AM, Adam Hitchens wrote: > Hello, > > are there any suggested ways/tools to host an angular 2 app on s3? The > quickstart has

Re: [AngularJS] Getting error on loading in angular2 RC4: Error: XHR error (404 Not Found) loading

2016-07-05 Thread 'Lucas Lacroix' via AngularJS
Best guess: your node_modules folder in not accessible from your webserver. On Tue, Jul 5, 2016 at 3:15 PM, Navaneetha Krishnan S wrote: > I am getting the following exception when the application is loading on > the browser. Please find the config files and error

Re: [AngularJS] Re: Can we see some sample code for passing FORM data to a server script?

2016-07-05 Thread 'Lucas Lacroix' via AngularJS
I have no sample code off-hand, but take a look at the Http class , which can be used as the basis for you to create a FormSubmit service for your API. You would use it very similar to how you would use $.ajax but instead of a

Re: [AngularJS] ngKeyup, ngKeydown and ngKeypress

2016-07-05 Thread 'Lucas Lacroix' via AngularJS
I don't think this is an Angular issue. KeyUp and KeyDown events are different from KeyPress events. KeyUp/Down give you key codes while KeyPress gives you character codes - sometimes these are the same, sometimes they are not. The way in which the different browser have implemented the events

Re: [AngularJS] Angular 2: Can't resolve all parameters for NotificationsService: (?, ?).

2016-07-05 Thread 'Lucas Lacroix' via AngularJS
I do not see your component with it's list of providers nor do I see your bootstrap call with the list of providers. On Tue, Jul 5, 2016 at 10:04 AM, HisDivineShadow < buddy.ackerman...@gmail.com> wrote: > I get this error loading my app. I'm injecting the NotificationsService > into my app

Re: [AngularJS] Re: Injecting without constructor

2016-07-08 Thread 'Lucas Lacroix' via AngularJS
My understanding is that all injected dependencies are singletons. So, if you inject the same type of thing in multiple places, you should receive the single instance of that thing. On Fri, Jul 8, 2016 at 12:58 PM, Paulo Coutinho wrote: > Hi, > > I need a global service

Re: [AngularJS] Re: Injecting without constructor

2016-07-08 Thread 'Lucas Lacroix' via AngularJS
my global service is from the constructor? Or i can > create a component with any constructor and on "OnInit" i set > "this.myService = ???". > > Thanks. > > > On Fri, Jul 8, 2016 at 2:00 PM, 'Lucas Lacroix' via AngularJS < > angular@googlegroups.c

Re: [AngularJS] Sanitization warnings on color strings in Angular2

2016-07-08 Thread 'Lucas Lacroix' via AngularJS
You're better off using Angular2 style: On Fri, Jul 8, 2016 at 5:00 PM, 'Forrester Cole' via AngularJS < angular@googlegroups.com> wrote: > Hi all, >I'm trying to set the background-color style of an element using a > template. I have template html code that looks like: > > >

Re: [AngularJS] Re: Angular2 cannot find element

2016-07-08 Thread 'Lucas Lacroix' via AngularJS
There are no syntax or network errors in the console, so it is neither a syntax issue nor a typo in a file name. Even if that were the issue, the error indicates it can't find the 'login' element in index.html. The question is: how is bootstrap not finding the element when it clearly and

[AngularJS] Angular2 cannot find element

2016-07-08 Thread 'Lucas Lacroix' via AngularJS
I'm not sure what's going on here. This is my index.html: ... Initializing... The component passed into bootstrap is as follows: @Component({ selector: 'login', template: template, styles: [style.toString()], directives: [] }) export class Login { constructor() {

Re: [AngularJS] Re: Angular2 cannot find element

2016-07-09 Thread 'Lucas Lacroix' via AngularJS
It is the entire example except the CSS and HTML of the component have been excluded for brevity. They are inconsequential as the code isn't even getting as far as processing it - we are still bootstrapping which means we haven't even instantiated any components yet and the manipulation of the

Re: [AngularJS] Re: Angular2 cannot find element

2016-07-10 Thread 'Lucas Lacroix' via AngularJS
The example really is this simple and it us not a problem with imports. In order for bootstrap to get to the point where it is looking for the element in the DOM and throwing this error, all imports would have to be completed and all Javascript interpreted successfully. Otherwise, there would be

Re: [AngularJS] Angular 2: Can't resolve all parameters for NotificationsService: (?, ?).

2016-07-05 Thread 'Lucas Lacroix' via AngularJS
I think you're missing the FindService in your providers that are passed to bootstrap. I do not see it referenced. As long as a provider is specified for each injectable, this should work. On Tue, Jul 5, 2016 at 10:39 AM, HisDivineShadow < buddy.ackerman...@gmail.com> wrote: > So, after some

Re: [AngularJS] Re: AuthGuard CanActivate navigate to the previous url the user was in - Angular 2

2016-07-04 Thread 'Lucas Lacroix' via AngularJS
Yes. On Mon, Jul 4, 2016, 09:33 Simon Azzopardi wrote: > Hi Lucas, > > You mean I need to crop the url to get the last part of the url, example > clients? > > > On Monday, July 4, 2016 at 12:28:08 PM UTC+2, Lucas Lacroix wrote: > >> Like I said already: you will

Re: [AngularJS] Re: Angular2 cannot find element

2016-07-11 Thread 'Lucas Lacroix' via AngularJS
I updated to rc4 from rc1. The error is now: "Error during instantiation of AnimationDriver!" which, conveniently, had results in Google. The issue is as I thought: bootstrap does not wait for the onload event. I have changed my code to do this: window.addEventListener('load',(evt)=>

Re: [AngularJS] Two way binding is not working for input type in Angular 2 with IE 9

2016-08-04 Thread 'Lucas Lacroix' via AngularJS
Could you reproduce in a plunkr? On Thu, Aug 4, 2016, 19:53 rajesh patel wrote: > Hi, we are using Angular 2 and we need to support IE 9 for our customer > My pages are working fine in Chrome and Firefox but with IE 9 two way > binding is not working > whatever I change in

Re: [AngularJS] @NgModule

2016-08-04 Thread 'Lucas Lacroix' via AngularJS
I can only answer your JIT question. JIT is suggested (maybe even necessary) when developing using a server that implements a live-reload mechanism as it significantly shortens the time developers need to wait for the application to show the changes they have made. JIT should never be used in

Re: [AngularJS] [Angular2] const Objects, e.g. Hero.DR_EVIL

2016-08-05 Thread 'Lucas Lacroix' via AngularJS
​My guess would be that the constant has not been imported where you are using it. Where are you trying to use the constant? In a template, maybe? One ​other thing, unrelated to your issue, is you have defined Hero as a class but you initialize the constant as a generic object. You should add a

Re: [AngularJS] browser_adapter.js:84 ORIGINAL EXCEPTION: TypeError: iterator1.next is not a function - after updating to Chrome Version 52.0.2743.116 (64-bit)

2016-08-08 Thread 'Lucas Lacroix' via AngularJS
It looks to me like you're running the code in a browser that doesn't support ES6 iterators and you are missing the shim/polyfill. On Mon, Aug 8, 2016 at 11:46 AM, Darragh Flynn wrote: > I get a the following error message when trying run my Ionic/Angular 2 app > in the

  1   2   >