Re: [AngularJS] please recommend me a Angular book.

2019-08-20 Thread Zlatko Đurić
Hi, Angular.io has a resources page with a lot of good things,maybe you can find something interesting there as well: https://angular.io/resources Zlatko -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe

[AngularJS] Re: How to make Method process in sequence

2019-07-15 Thread Zlatko Đurić
Hi Siva, Your call to the method is sync, but the actual execution is async. Additionally, your method1 calls method2, which has what we call a *side effect*. (Setting that local *path* variable). You can do several approaches here, e.g. use a promise, like Tito suggested: buttonClick() {

[AngularJS] Re: Define static variable on build

2018-12-04 Thread Zlatko Đurić
Hi Sander, On Wednesday, December 5, 2018 at 5:27:36 AM UTC+1, Sander Elias wrote: > > Hi Zlatko, > > Doesn't that pull the entire package.json into your build? > That means that you putt all available attack vectors into the public part > of your code, right? (yeah, it saddens me that I do

[AngularJS] Re: Define static variable on build

2018-12-04 Thread Zlatko Đurić
FWIW this works for me in environments file: export const environment = { env: 'DEV', production: false, useMocks: false, clientVersion: require('../../package.json').version, // the rest of the stuff. }; -- You received this message because you are subscribed to the Google Groups

[AngularJS] Problem when loading routes from DB dynamically

2018-11-12 Thread Zlatko Đurić
The problem might be that your routes are not available at resolve time. You can go load the things later, but it doesn't matter any more, the router already failed. You could put the router loader config into app initializer though. Then routes would get loaded before the app starts. Can't

[AngularJS] Re: disable not working in ng-options in angularjs v1.1.5

2018-10-27 Thread Zlatko Đurić
Not a workaround, but a solution. If you don't want to upgrade angular to a version that has this feature, you have to implement the feature yourself. So you can tell the management in the company that upgrading angular costs X, and developing just this feature costs Y. It's quite likely that Y

[AngularJS] Re: How to prevent parent ngOnInit()

2018-10-24 Thread Zlatko Đurić
Hi Prashant, TL:DR; If you have something happening in your component, and you want to influence something up the hierarchy tree, you set this value in a service injected to both child and parent, and then move the parent's code in question from ngOnInit to a method that fires (or not)

[AngularJS] Re: How to live build an angular workspace project

2018-10-20 Thread Zlatko Đurić
Hi Christophe, I can think of two ways to go forward with this, both with some caveats. I'm not sure if it would be feasible or even advisable, but there might be a way to deal with this with custom tsconfig paths definitions. As you "ng generate" a library, it'll add a path to the dist folder

[AngularJS] Re: pretty url

2018-10-14 Thread Zlatko Đurić
Hi Marc, This shouldn't be hard, at least not on the Angular side. Let's say you have root-level routing pointing to your blog module: { path: 'blog', loadChildren: './blog/blog.module#BlogModule' } Now this blog module has two routes: "*list articles*" and "*display single article*". {

[AngularJS] Re: Is it possible to bypass the Error Interceptor selectively?

2018-10-11 Thread Zlatko Đurić
Hi Partha, In addition to what Sander has said, you can be more specific in your error interceptor on the Angular side. Something like this: intercept(request: HttpRequest, next: HttpHandler): Observable< HttpEvent> { return next.handle(request) .catch(response => { if (!response instanceof

[AngularJS] Re: Inheritance and Generics

2018-09-28 Thread Zlatko Đurić
nternet, I figure that it is some known bug in Angular. > > Regards, > Partha > > On Friday, 28 September 2018 12:42:09 UTC+5:30, Zlatko Đurić wrote: >> >> In short, yes, you can extend a TypeScript class or implement an >> interface, and you only

[AngularJS] Inheritance and Generics

2018-09-28 Thread Zlatko Đurić
In short, yes, you can extend a TypeScript class or implement an interface, and you only need to import the class in the component itself. You can even import a class from a library in your Node modules folder. But there are two things to be aware of: - you have to make sure that the

Re: [AngularJS] Re: Changing a Components Template without Subclassing

2018-09-02 Thread Zlatko Đurić
gular cli does not currently do this, so I simply have a post > build script in my package.json file. > > "postBuildAuth": "cp -r ./projects/agape/auth/src/assets > ./dist/agape/auth/assets " > > > So, here's to keeping my fingers crossed that this

[AngularJS] Re: Changing a Components Template without Subclassing

2018-08-31 Thread Zlatko Đurić
The problem here is that your template is not present at runtime. Angular Compiler takes metadata and your typescript code, and creates their internal representation of all the stuff. Basically, decorations are moved to something like CompiledComponent.annotations = { template: '...', ... }.

[AngularJS] Re: How to display a build number in my App

2018-08-31 Thread Zlatko Đurić
Sure, several ways! You can have a small node script that creates your appropriate *environment.ts* on build time. Something like with templating. Or, e.g. create a *version.json* on build time next to the env, and have your app load from there on start - basically the same idea just slower.

[AngularJS] Angular 6 - Rendering of dynamic content

2018-08-18 Thread Zlatko Đurić
If you just want to render some hand-written HTML, use DomSanitizer (https://angular.io/api/platform-browser/DomSanitizer, here is an example: https://stackblitz.com/edit/angular-safe-unsafe-html) in your component. If you want more dynamic behavior with template binding etc, you can either try

[AngularJS] Re: Angular 2 error monitoring

2018-08-17 Thread Zlatko Đurić
Hi, There are serveral good open-source alternatives. For example, you can install and run your own Sentry instance (https://docs.sentry.io/server/installation/) for free, and use Raven.js as your ExceptionHandler (https://raven-js.readthedocs.io/en/stable/integrations/angular2.html). Or you

[AngularJS] Re: Create multi step angular 6 without material

2018-08-14 Thread Zlatko Đurić
Not sure exactly what you're aiming at - multi-step forms? Here's a pretty basic example (with dynamic steps as a bonus): https://stackblitz.com/edit/angular-multi-step-forms?file=src/app/app.component.ts Not very sophisticated, but it shows the basic steps, dynamic routes, static routes, such

[AngularJS] uib-accordion in angular 5.2 with bootstrap 4

2018-08-11 Thread Zlatko Đurić
Try ngx-bootstrap, most of Bootstrap is covered there. Works with bootstrap 3 and 4. Zlatko -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: [AngularJS] Re: [Angular] Test Services and HTTP

2018-08-08 Thread Zlatko Đurić
the image below it doesn't continue to the expected page > where i can see the logs of the > test. > > Do you have any idea regarding this > > > > On Wed, Aug 8, 2018 at 2:57 PM, Zlatko Đurić wrote: > >> Hard to answer when you provide so vague a question. But since you a

[AngularJS] Re: Anglular 6 authentication to CRUD RestAPI set headers

2018-08-08 Thread Zlatko Đurić
Hi Alex, Two things. First, as the error tells you, you need to use HttpHeaders, not Headers. See here from your example: On Tuesday, August 7, 2018 at 7:02:01 PM UTC+2, a.kr...@ich-selber.de wrote: > > > import { HttpClient, HttpHeaders } from '@angular/common/http'; > const headers =

[AngularJS] Re: [Angular] Test Services and HTTP

2018-08-08 Thread Zlatko Đurić
Hard to answer when you provide so vague a question. But since you ask something so basic in such an unanswerable manner, I assume you don't even understand why your question might be a bit out of place. In that case, I seriously recommend going to the source. Go ahead and read everything

Re: [AngularJS] Re: "angular-in-memory-web-api --save" not installing correctly

2018-08-07 Thread Zlatko Đurić
Well, not sure what to advise you here. As said, I can't see what you have. Maybe the best thing is to try from scratch, install the tutorial in a new directory and play with it there. On Tue, Aug 7, 2018 at 9:24 AM wrote: > No, I just installed the version the tutorial said to install. That

Re: [AngularJS] Re: "angular-in-memory-web-api --save" not installing correctly

2018-08-07 Thread Zlatko Đurić
That could be the issue too. Hard to say without looking at any code though. Did you try changing the version to whichever Angular you use? On Tue, Aug 7, 2018 at 9:11 AM wrote: > You think it could be this issue? This is the tutorial and command I am > trying to do. >

[AngularJS] Re: "angular-in-memory-web-api --save" not installing correctly

2018-08-06 Thread Zlatko Đurić
Hi, On Tuesday, August 7, 2018 at 1:15:25 AM UTC+2, georgeogo...@gmail.com wrote: > > Howdy. When I try to install angular-in-memory-wep-api --save, it doesn't > work and gives messages on the CLI: "6 vulnerabilities require manual > review and cannot be updated". I found the website with the

[AngularJS] Re: Angular 6 routing change layout for one childpage

2018-08-02 Thread Zlatko Đurić
Sure it is. Just define the new route before the other profile route if you have a possible path collision; Angular will render the first route that matches. On Wednesday, August 1, 2018 at 5:55:44 PM UTC+2, fr...@ugetit.eu wrote: > > Hi Guys, >

[AngularJS] Angular 4 Component for Multiselect with auto-suggest

2018-05-27 Thread Zlatko Đurić
Try ng2-select: https://valor-software.com/ng2-select/ -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com.

[AngularJS] Why moving from one version of Angular to another is so painful ? Is Angular a right choice for the client side development ?

2018-05-15 Thread Zlatko Đurić
In addition to the other two answers, I will add another line of thought, perhaps a little controversial. The answer to your question might be " yes", you have made a mistake by choosing Angular. We're all focused on different fields and front-end development might not be your strong side.

Re: [AngularJS] Re: Do I use routes or a directive?

2018-05-10 Thread Zlatko Đurić
Sure there's a way. But the question is, why do you fetch the data from the _component_ each time, perhaps you can keep the data on a service and then define your triggers for refreshing the data. On Thursday, May 10, 2018 at 5:27:45 PM UTC+2, Reza Razavipour wrote: > > destroyed would mean,

[AngularJS] Re: Angular in a multi monitor environment

2018-03-26 Thread Zlatko Đurić
Jürgen, That's exactly what I've said: you cannot have multiple windows without having multiple apps. Basic tech is not angular-specific: window.open, window.postMessage, window.opener, window.addEventListener('message', ...). Those are all parts of the regular JavaScript API. So, basically,

[AngularJS] Re: Angular in a multi monitor environment

2018-03-23 Thread Zlatko Đurić
For what it's worth, this sounds like a viable scenario in controlled environment. Nothing to do with Angular specifically, though. You mention accident reports and a map of them. I assume this means this will be running by trained operators who know how to follow instructions, or maybe public

[AngularJS] Re: cmd zurück zur Eingabe

2018-03-09 Thread Zlatko Đurić
Hi Frank, Du hast mindestens zwei Möglichkeiten: 1. STRG-C Damit ist die läufende Kommande gebrochen (so, "ng serve" läuft nicht mehr). 2. "ng serve" im Hintergrund starten: ng serve & Jetzt läuft dein "ng serve" Prozess in Hintergrund und dein Shell ist frei für neue Kommande.

[AngularJS] Re: Need to pass class styles into Angular module/component... anyone have naming conventions they use?

2018-03-01 Thread Zlatko Đurić
On Wednesday, February 28, 2018 at 4:05:52 AM UTC+1, Warwick Price wrote: > > To enable the parent to still be able to override the styling on these > components > > I think you might want to reconsider this. CSS works better and is way easier to deal with when you work the other way

[AngularJS] Re: Cannot read property account_group_name of null

2018-02-17 Thread Zlatko Đurić
Alternatively if empty rows/cells are ok, try this: {{ accountgroup?.account_group_name }} -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email

[AngularJS] Moving our business app from AngularJS 1.6 to Angular 5

2018-02-17 Thread Zlatko Đurić
Having very recent experience with something similar, I would say you'll need a week to set up and adjust your workflow. Then, if your code is mostly in services and if you had component based approach, "just changing the bindings" will take a few weeks to few months, depending how much work

[AngularJS] Re: express api using one index.js that points to many route files

2018-02-15 Thread Zlatko Đurić
What do you do in those files with the app? On Wednesday, February 14, 2018 at 8:55:33 PM UTC+1, Tito wrote: > > Greetings, > > I want to use one index file that is called from my main app.js > > routes = require('./routes')(app); > > The index.js in that routes folder calls > > module.exports =

[AngularJS] Re: Developing an Angular Application

2018-01-09 Thread Zlatko Đurić
In addition to downloading and installing Node.js, and @angular/cli and all the core angular frameworks, as Sander says, I suggest the following list, too. Libs: - your UI library of choice (like Material Design -> then @angular/material and @angular/cdk, or bootstrap: ngx-bootstrap or

[AngularJS] Re: Material Design vs Bootstrap (or both?)

2018-01-05 Thread Zlatko Đurić
You need bootstrap to have the material theme specifically or regular bootstrap works for you? If you don't care, maybe you can put your bootstrap experience to good use with ngx-bootstrap or ng-bootstrap? I've also used MD lite (https://getmdl.io/) but had to write some wrappers for

[AngularJS] Re: How to use a global variable in HTML and use it in typescript? (Angular4)

2018-01-04 Thread Zlatko Đurić
You could "teach" typescript that there is a "standalone" global variable, e.g. in your module: declare const standalone: any; .. // further in component.. this.property = standalone === 'true' ? true : false; You could even give it some type instead of any. But then it's not on your

[AngularJS] Re: How to listen to Server POST event in Angular 5

2018-01-01 Thread Zlatko Đurić
Happy New Year! I'll try to give you a hint. Web app type clients can't listen to classic HTTP POST. In fact, webapps typically can't serve any type of HTTP requests. If you need the server to initiate contact, look into technologies like websockets, Web Push API, server-sent events or even

[AngularJS] Dynamic validator checks

2017-12-28 Thread Zlatko Đurić
I need to dynamically add a validator to an angular form control from a directive. Example: @Directive({ selector: 'my-directive' }) export class MyDirective implements AfterViewInit { @Input() myDirective: boolean; control: AbstractControl; constructor(private form: NgForm, private

[AngularJS] Track dynamic number of inner observables

2017-12-28 Thread Zlatko Đurić
I have a service in Angular 5 which exposes a BehaviorSubject. It needs to track a dynamic array of inner subscriptions, that come and go on the fly and each, once active, can be "on" or "off" (true/false, whatever). My exposed subject should return all values (or, well, just an OR of all

[AngularJS] Re: AngularJS+Typescript unit testing - Why karma

2017-12-05 Thread Zlatko Đurić
Hi Brian, I definitelly think you could do that. Just as you run "karma start", you could also run "mocha". The problem karma is solving is not simply how to run tests though. It's also how to setup the whole environment. Sure, you can mock an HTML element, run a spy on that element. Then you

[AngularJS] Re: breaking down monolithic index.js

2017-12-02 Thread Zlatko Đurić
Well the recommended pattern is to break down code by components. So try to make at least as many folders as you have specific pages and put code for each individual page into it's individual folder. And when you see some code that you're repeating (it's common to all, e.g. some specific

[AngularJS] Re: Cannot Read Property 'Navigatee' of undefined

2017-11-30 Thread Zlatko Đurić
On Wednesday, November 29, 2017 at 7:44:16 AM UTC+1, ayushsing...@gmail.com wrote: > > > Query on ngSubmit see screenshot attached > Screenshot of the app doesn't help, can you share code? And preferably as a plunkr or stackblitz or similar? -- You received this message because you are

[AngularJS] Re: template vs. reactive Angular forms

2017-11-10 Thread Zlatko Đurić
Hi Rich, In addition to what Sander has said, I'll add one more vote for template-driven forms. I often have to style the forms specifically, and reasoning about that is, to me, much easier when I can see what I'm styling - but that heavily depends on what kind of an app you're working on. I

Re: [AngularJS] Re: n00b question: concatenating string using 2 way binding

2017-11-08 Thread Zlatko Đurić
On Wednesday, November 8, 2017 at 2:07:43 AM UTC+1, Rich Leach wrote: > > LOL > > ... you would think this would be something easy > > {{data[0].companyName}} is not working, nothing gets returned (no errors > either). > > I've included the returned json below (copied directly from the

[AngularJS] Re: Search filter is too slow in angularjs with large dataset

2017-11-08 Thread Zlatko Đurić
Hi, On Wednesday, November 8, 2017 at 5:51:39 AM UTC+1, Suhas Pansare wrote: > > I have AngularJs client application which displays data in table using > dir-paginate directive of dirPagination.js > > current-page="vm.current_page"> > > Here is the search input > > > > > > I think something

Re: [AngularJS] Re: n00b question: concatenating string using 2 way binding

2017-11-07 Thread Zlatko Đurić
Well, if it's aan array, you will have to do something like dara[0].companyName. What does your json look like? Also, use data?.companyName in the template, so that it doesn't break if your data is undefined, like when you're getting the quote. On Nov 8, 2017 1:35 AM, "Rich Leach"

[AngularJS] Re: n00b question: concatenating string using 2 way binding

2017-11-07 Thread Zlatko Đurić
Hey Arnaud, On 07.11.2017 09:15, Arnaud Deman wrote: In the associated component you just need something like : @Input() tikersymbol: string; As you use two way binding the value will be updated when the user enter a value. Here is the angular doc :

[AngularJS] Re: n00b question: concatenating string using 2 way binding

2017-11-07 Thread Zlatko Đurić
If it's a template-driven form, your component would have a property named that. E.g. export class MyComponent { tickersymbol:string; // later in the code... getQuote() { this.myService.getQuote(this.tickerSymbol).subscribe(); } } On Tuesday, November 7, 2017 at 2:13:10 AM

[AngularJS] Re: Dynamic HTML passed to Angular

2017-10-25 Thread Zlatko Đurić
On Tuesday, October 24, 2017 at 8:40:43 AM UTC+2, forexleads wrote: > > I am a content management architect looking for some guidance from the > Angular experts. Following is my thought process for a project. Please let > me if this is doable and recommended. > "For some pages, to deliver

[AngularJS] Re: Dif btw angular 2 and 4??

2017-10-25 Thread Zlatko Đurić
On Tuesday, October 24, 2017 at 8:40:43 AM UTC+2, Felix Christo wrote: > > Currently I am working on Angular 2. Whats s the diff btw angular 2 and 4? > Better HttpClient (with proper interceptors), better animations, and depending on which 2, much better router. Which 2 do you have? FWIW

[AngularJS] Re: Redirect with API response

2017-10-25 Thread Zlatko Đurić
Well, localStorage is also not going to persist accross subdomains. Basically it's a cross-domain problem. But you say you'll have to reload onmce again once you have the token in local storage? I don't think that's the case, you can simply inject Router into your AuthComponent (whichever

[AngularJS] Re: Values returned by service display fine in console, cause error on screen

2017-10-25 Thread Zlatko Đurić
Well, two things. For one, the way you define your property, *stock*, it's undefined when the thing is initialized. So, before the *dataService* gets the data back, it's undefined in the template, so yuou have *undefined.symbol* - so that's what fails. You can any of these: [...snip...]

[AngularJS] Re: Redirect with API response

2017-10-25 Thread Zlatko Đurić
So I assume that e.g. I login to login.app.com as *zla...@mydomain.com*, then your login API returns something like: *{ accessToken: ..., domain: mydomain }*, and then login form redirects me to mydomain.app.com. Yes, in that case, you'd likely lose all that extra info. Now, first the simpler

[AngularJS] Re: Configuration driven Components

2017-10-20 Thread Zlatko Đurić
On Friday, October 20, 2017 at 6:06:31 PM UTC+2, Gaurav Verma wrote: > > Thank you Zlatko for your response. You said @Input() layout = > 'horizontal' will allow me to configure the NavBar layout but how can I > dynamically set the layout? > This particular problem is sSimple to solve:

[AngularJS] Save the smart table content whe the button is clicked

2017-10-20 Thread Zlatko Đurić
Not with angular alone. What you can do is pick up the changes on button click, and send those changes (or the whole new JSON) to a server that can write to files. So if your backend server is something like nginx, apache or "ng serve", you can't write that change. But if you have a Node.js,

[AngularJS] Re: Configuration driven Components

2017-10-19 Thread Zlatko Đurić
Hi Gaurav, Let me also take a shot at this. If I understand this properly, you want to have a Core module which provides NavBar as a navbar component, which can go horizontally or vertically. Additionally, the items in navbar are implemented as NavBarItem components. Perhaps you also have a

[AngularJS] Re: Änderungen im Code werden durch ng serve nicht publiziert

2017-10-19 Thread Zlatko Đurić
On Wednesday, October 18, 2017 at 2:41:49 PM UTC+2, andre@netzwerkcenter.ch wrote: > > Hallo zusammen > > Ich habe immer wider die Situation, dass neue Methoden nicht automatisch > bei gestartetem ng serve verfügbar sind. > Erst nach dem ich via Ctr. + C den Server gestoppt habe, und dann

[AngularJS] Re: Deploying Angular to AWS - S3 or Elastic Beanstalk?

2017-10-19 Thread Zlatko Đurić
Hi William, On Tuesday, October 17, 2017 at 8:32:53 AM UTC+2, William Saxton wrote: > > I'd like to use AWS to host my Angular web app, as well as use all of the > Amazon cloud services as necessary (DynamoDB, ElasticCache, etc). I > planned on using Elastic Beanstalk because I have experience

[AngularJS] Re: AngularJS: socket.io or anything you recommend

2017-10-17 Thread Zlatko Đurić
On Monday, October 16, 2017 at 10:00:46 PM UTC+2, Tito wrote: > > Greetings, > > I would like to start using socket.io so that I can display changes on > back end to client's UI so that user does not need to refresh screen. > Any good reads out there you recommend? and/or do you recommend

[AngularJS] Re: How to use angular2 http API for tracking downloading progress status

2017-10-14 Thread Zlatko Đurić
On Friday, October 13, 2017 at 1:57:21 PM UTC+2, Vinu Prasad wrote: > > Hii..everyone angular2 . There are many fetching process takes place in my > project from server-side. I want to display the data fetching status at > client side . Plase help me how can I make it possible. > I'm not

[AngularJS] Re: Interfacing old system with new Angular 4 frontend

2017-10-14 Thread Zlatko Đurić
Well, that click to post went out too fast :) I've meant to say, look at this plunk to see what I'm talking about: https://plnkr.co/edit/ifgGessycEUdy7lL0Y57?p=preview On Saturday, October 14, 2017 at 10:05:59 AM UTC+2, Zlatko Đurić wrote: > > Robert, I think it's a simple scope issue

[AngularJS] Re: Interfacing old system with new Angular 4 frontend

2017-10-14 Thread Zlatko Đurić
Robert, I think it's a simple scope issue. Your iframeClickHandler is attached to a click freely, which means it's scope is the iframe, not your component. Hence this.router is undefined. You need to bind that function to your component, like this: if (typeof doc.addEventListener !==

[AngularJS] Re: bypassSecurityTrustHtml stripts angular form tags

2017-10-09 Thread Zlatko Đurić
Did you try injecting some common service into that dynamic module, and then communicate via that service? -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it,

[AngularJS] Picture taken from Camera/Gallery not reloaded

2017-10-09 Thread Zlatko Đurić
I suspect you might need to sanitize the file url. Now I don't remember exactly for angular 1, but I think the service is called $sce, so look into that first. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe

[AngularJS] Re: bypassSecurityTrustHtml stripts angular form tags

2017-10-06 Thread Zlatko Đurić
On Thursday, October 5, 2017 at 9:59:47 PM UTC+2, Turkel wrote: > > Great it works perfectly now. After hours of tries I was able to combine >> code Router, Http and HTML Converter within one component. >> > You are great developer, i`d love to be your student :) > > Thanks, I appreciate a good

[AngularJS] Re: bypassSecurityTrustHtml stripts angular form tags

2017-10-02 Thread Zlatko Đurić
Well, you didn't add formsModule to your *dynamic* module :) Try this: https://plnkr.co/edit/vEEQECofC7qfvCYCJ4bg?p=preview -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop

Re: [AngularJS] Re: bypassSecurityTrustHtml stripts angular form tags

2017-10-01 Thread Zlatko Đurić
Sorry, my mistake, typing that on a phone without checking. You don't need sanitizer here. Put the "actions" prop directly into the template. On Oct 1, 2017 9:01 PM, "Turkel" wrote: > The HTML which I m fetching is : >> > > {"actions":"Password<\/label>\r\n\t\t\t

[AngularJS] bypassSecurityTrustHtml stripts angular form tags

2017-10-01 Thread Zlatko Đurić
The problem is that such form (or anything you passed in via sanitizer) is outside of angular scope. Simply said, angular doesn't know about your form. You could, after you pass the form in, try and attach your own listener to the form, but that's messy and probably buggy and has other problems

[AngularJS] Re: Add http header to loadChildren http request

2017-09-21 Thread Zlatko Đurić
Hi Brian, I think overriding Http or HttpClient won't help with this - Angular uses ResourceLoader to load templates etc. You would need to override that and provide your own implementation. Check this ticket as a starting point: https://github.com/angular/angular/issues/13286 Zlatko -- You

[AngularJS] Re: Angular 4 material select option filter null and space

2017-09-17 Thread Zlatko Đurić
Simply filter this in your component. When you fetch that data, do something like this: this.places = data.places.filter(p => p.place); That should do it. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe

[AngularJS] storing a max value in a component

2017-08-04 Thread Zlatko Đurić
The simplest would be `max` operatorin an observable: https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/max.md -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and

[AngularJS] Re: docker as a dev tool set?

2017-07-31 Thread Zlatko Đurić
I agree with Juri. Docker can be quite useful. But the question is, is it useful to *you*? What specific job you want it to do? Develop your angular apps, and only deploy them as docker images? Or maybe use docker images of your backend server for use in local development? Or use some

[AngularJS] Re: 80% of my coding is doing this (or why templates are dead)

2017-07-28 Thread Zlatko Đurić
The article is interesting, although with a bit different perspective than mine. Here's my take on the issue. I think the perspective I've mentioned is about the proper abstraction. And proper separation of concerns You say (or I think you do) that the goal of your JavaScript code is to

[AngularJS] Re: what is the preferred pattern for creating a repeater (repeating divs) in ng2?

2017-07-28 Thread Zlatko Đurić
Well, *ngFor *is* the repeater for Angular, if you want to use it. I'm not sure if you just got the syntax wrong or you're asking for something more complex. In case it's just about syntax, you have to do something like this: {{ user.name }} Maybe you also want to show the numbers,

[AngularJS] Angular 2 - Get viewContainerRef of a different Component

2017-07-27 Thread Zlatko Đurić
Can't you pass it around like anything else in Angular, via a service? A simple Subject could probably pass this around. In any case it sounds fishy to pass those around. I assume that there might be a case but I can't think of one right now. What is it that you're trying to achieve? Hook to

[AngularJS] Re: periodic refresh using xml http get request

2017-07-27 Thread Zlatko Đurić
On Wednesday, July 26, 2017 at 2:20:21 PM UTC+2, Stéphane Ancelot wrote: > > I have a view that will need to refresh some data on display every 300ms. > > I will get these data with an xml http get request. > > what sounds to be the best method to do the refresh loop (getting data and > refresh

Re: [AngularJS] Re: running angular multiple apps from one folder

2017-07-25 Thread Zlatko Đurić
with node.js > I would also like to use same node_modules for these I do not want > node_modules sprawl. Is that possible to have shared modules folder for > both to use? > > Thanks > > On Wednesday, June 21, 2017 at 1:16:28 AM UTC-7, Zlatko Đurić wrote: > >> Hi

[AngularJS] Re: Is it safe to import custom .js files, and Jquery library ?

2017-07-19 Thread Zlatko Đurić
On Wednesday, July 19, 2017 at 4:03:20 AM UTC+2, kapil Budhiraja wrote: > > > I'm writing an web application using Angular 4, and would like to know if > it's safe to load a JavaScript file to connect to socketIO for emitting and > listening on responses ? > Also, I want to use jQuery for

[AngularJS] Re: How to implement ACL / role based authorization with angular 2?

2017-07-19 Thread Zlatko Đurić
On Monday, November 28, 2016 at 4:51:35 AM UTC+1, Sander Elias wrote: > > > I also add something like this to the css of the project, to prevent items > from briefly flashing into view: > [has-access] { >display:none !importand > } > > > Well this is a cool trick that I haven't thought of

[AngularJS] Re: dynamic layout of controls

2017-07-14 Thread Zlatko Đurić
There are multiple ways to do this. One is: wait until you load the config file and then *redirect to *a url that will render the appropriate components. You might use router, or even multiple router outlets for all that. E.g. let's say your base route is something like /treeview. So you read

[AngularJS] Re: Wait for http.post to return Cookie.set

2017-07-12 Thread Zlatko Đurić
On Wednesday, July 12, 2017 at 10:00:16 AM UTC+2, Tommaso Betti wrote: > > How can i return an Observable in the private method if i have to return > the Cookie if i don't need to refresh? > Isn't the same thing that i'm doing here? > > if (!Cookie.get("access_token")) { >

[AngularJS] Wait for http.post to return Cookie.set

2017-07-11 Thread Zlatko Đurić
Well it's not"after the map" that's the problem here, it's"after the map has resolved". So in your use case when you need to call getRefresh, you would have to chain the two calls; first, call the refresh token endpoint, and when it comes back, than you can use your cookie. So your "resource"

[AngularJS] How Do I disable a clicked button in AngularJS?

2017-07-10 Thread Zlatko Đurić
Maybe have is Disabled being a map instead? E.g.directive would be: ng-disabled="isDisabled[$index]" And than your controller sets that: addToCart(index, ...rest) { ... this.isDisabled[index] = true; ... } (Or whatever the method names, typing on a phone here). --

[AngularJS] Need local style sheets

2017-07-09 Thread Zlatko Đurić
I would try downloading the bootstrap libs locally: https://v4-alpha.getbootstrap.com/getting-started/download/ Or maybe via npm: npm install bootstrap@4.0.0-alpha.6 After that, you would need to change your build process, whether it's manual, ng-client, webpack or something else, to include

[AngularJS] Re: angular2 and lite-server

2017-07-02 Thread Zlatko Đurić
I would still avoid it. For one, now you have a firewall in front of your XP box, but it still has potential built-in vulnerabilities and it's still a bottleneck, potentially slowing down the whole service you're providing. And the second thing, you gain nothing by it. What's the problem you're

[AngularJS] Re: How to Select First row index of P-dataTable in Angular ?

2017-07-01 Thread Zlatko Đurić
On Thursday, June 29, 2017 at 11:22:24 AM UTC+2, har...@rapidd.net wrote: > > > I am showing some data in P-dataTable but i want to put input text field > on click on first row of table only (I am getting inout box but get > repeated through out of thee table). > This should be really easy to

[AngularJS] Re: running angular multiple apps from one folder

2017-06-21 Thread Zlatko Đurić
Hi Tito, Congratulations on your first production deployment! :) There are multiple ways to run multiple "apps" from one Node (express) app. You're saying Angular apps, but it seems like Node.js is involved too, so I'll try to address some cases. If you have one very specific TL;DR: - if

[AngularJS] Re: Angular with Typescript - why to instantiate object I get from server - performance dilemma

2017-06-07 Thread Zlatko Đurić
Sander, can you please enlighten me? I was under the impression that "casting" backend responses is just for static checks - when you compile Angular to JavaScript (to deploy to prod, or even run in browser), that no checks are actually enforced? E.g. take something like this: class Post {

[AngularJS] Re: Best Practice for REST API calls that take an extraordinarily long time?

2017-04-19 Thread Zlatko Đurić
On Wednesday, April 19, 2017 at 3:25:03 AM UTC+2, rob...@leapyear.io wrote: > > Imagine you have an Angular 2 app that makes calls to a REST API with > Observables. Further imagine that the response time of these calls will > take many tens of minutes or even hours to return a response. > >

[AngularJS] Re: How to launch in production using angularjs seed - in particular using GAE

2017-03-17 Thread Zlatko Đurić
Well, in theory, you don't need to run your server to run stuff on app engine, but that depends on which angular seed project are you using. You should have something like "npm build --prod" or some such script, or if it's angular-cli, "ng build --prod". That would create an output, usually in

[AngularJS] Re: AngularsJS 1 and AJAX queries - Remove GET parameter in URL before calling a page (before launching the route)

2017-03-17 Thread Zlatko Đurić
On Thursday, March 16, 2017 at 8:08:06 AM UTC+1, amadese wrote: > > Hi, > > I have problem with my application in Coldfusion 11 (main page: > http://hostname/myapplication/). > I'm trying (with *angularJs 1*) to implement the routes. > > The page contents different links like: > >-

[AngularJS] Re: Code review

2017-02-03 Thread Zlatko Đurić
On Thursday, February 2, 2017 at 8:54:40 AM UTC+1, Mark M wrote: > > I am an experience developer, but new to Angular. > > Is this a good place to ask for critique/code review on a new Angular > project? > There are a few people here who are usually constructive in their critique. I'm not

[AngularJS] Re: Angular JS server side data rendering on page load

2017-01-06 Thread Zlatko Đurić
If I understand correctly, you want to avoid the extra AJAX call/roundtrip, right? Two main options here: - no need to edit the data: render the list yourself in pure html, no need for ng-repeat. You can still add Angular components/binding or whatever tags, but you don't need ng-repeat

[AngularJS] Re: Multi user data binding question

2017-01-06 Thread Zlatko Đurić
On Thursday, January 5, 2017 at 2:34:16 PM UTC+1, tim garver wrote: > > Gotcha, > i was really more concerned with the auto refresh of the remote data. Then > the client to client would be automatic > > That is easily achieveable. It's just not part of the Angular as a framework. See, if server

[AngularJS] Re: Angualr2 MyApp compoment with dynamic innerHtml/template from render engine

2016-12-30 Thread Zlatko Đurić
That sounds like angular app didn't start at all. You also need to bootstrap the angular MyApp module somewhere. Are you doing that? What does your index.html look like? -- You received this message because you are subscribed to the Google Groups "Angular" group. To unsubscribe from this

[AngularJS] Angular 2 base ref issue

2016-11-05 Thread Zlatko Đurić
Yes, this is a simple, common issue. To load the app, you ask Apache the index.html page, which it serves you. While in the app, when you click "dashboard /tracker" link, angular intercepts it and simply displays you the new page. You never touch Apache. Now, when you refresh the page, you

Re: [AngularJS] Re: error 404 bootstrap with angular 2 final release

2016-10-04 Thread Zlatko Đurić
e already tried: > > > > > > > nothing worked > > What worked was to put the css file in a subfolder within the app > directory. > > thanks for help > > Em terça-feira, 4 de outubro de 2016 04:14:29 UTC-3, Zlatko Đurić escreveu: >> >> Hi >> &

  1   2   >