[AngularJS] Migrating from angular 6 to 7 breaks grid on IE

2018-11-12 Thread JRPG Gamer
Had to use ms grids 

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Dynamic routes not available when refreshing page or typing the url in the address bar

2018-11-12 Thread Jose Cristhian Padilla Pinto

Hi guys, please help with a problem, I'm loading my routes from a database 
through a web service. Once the page is loaded I can access all the routes 
using the links in the page and all works as expected. The problem is that 
those routers are not working when refreshing the page or typing directly 
the url in the browser's address bar.

a) To load the routes i use:
this.router.config.unshift({ path: item.path, loadChildren: () => 
FormdinamicoModule })

b) the routes are loaded in the app.component.ts constructor.

c) error in the browser for the "testing" route:

Router Event: NavigationStart
NavigationStart(id: 1, url: '/testing')
NavigationStart {id: 1, url: "/testing", navigationTrigger: "imperative", 
restoredState: null}
Router Event: NavigationError
NavigationError(id: 1, url: '/testing', error: Error: Cannot match any 
routes. URL Segment: 'testing')
NavigationError {id: 1, url: "/testing", error: Error: Cannot match any 
routes. URL Segment: 'testing' at ApplyRedirects.push../node_modules/@an…}
core.js:1673 ERROR Error: Uncaught (in promise): Error: Cannot match any 
routes. URL Segment: 'testing'
Error: Cannot match any routes. URL Segment: 'testing'


Thank you very much.

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Problem when loading routes from DB dynamically

2018-11-12 Thread Jose Cristhian Padilla Pinto
Hi guys, please your help with a problem I have. I'm loading routes from a 
DB through a web service and everything work as expected when using links 
to those routes. But when I refresh the page or I write directly the url in 
the adress bar the route does not work, why?

1) In the "app.component.ts" constructor I call a function that loads the 
routes

  async loadRoutes() {
await this.configService.cargarRutasMenu(() => {
  for (const item of this.configService._rutas) {
  this.router.config.unshift({ path: item.path, loadChildren: () => 
FormdinamicoModule });
  }
});
  }

2) Errors in the browser when trying to access the "testing" route

Router Event: NavigationStart
NavigationStart(id: 1, url: '/testing')
NavigationStart {id: 1, url: "/testing", navigationTrigger: "imperative", 
restoredState: null}
Router Event: NavigationError
NavigationError(id: 1, url: '/testing', error: Error: Cannot match any 
routes. URL Segment: 'testing')
NavigationError {id: 1, url: "/testing", error: Error: Cannot match any 
routes. URL Segment: 'testing' at ApplyRedirects.push../node_modules/@an…}
error: Error: Cannot match any routes. URL Segment: 'testing' at 
ApplyRedirects.push../node_modules/@angular/router/fesm5/router.js
ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL 
Segment: 'testing'
Error: Cannot match any routes. URL Segment: 'testing'
...

Thank you very much.

Node: 8.12.0
OS: win32 x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package   Version
---
@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-optimizer   0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core  0.7.5
@angular-devkit/schematics0.7.5
@angular/cli  6.1.5
@ngtools/webpack  6.1.5
@schematics/angular   0.7.5
@schematics/update0.7.5
rxjs  6.3.3
typescript2.7.2
webpack   4.9.2

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: CLI install error:

2018-11-12 Thread Tito


Hello there,

Try this?


npm config set http-proxy 104.16.27.35:443 
npm
 config set https-proxy 104.16.27.35:443 



On Monday, November 12, 2018 at 5:00:21 PM UTC-8, Rich Leach wrote:
>
> Hola Tito!
>
> Thanks for the link buddy, I checked it out and it said I should check out 
> my proxy settings, but I'm not sure what to set it to (I've never manually 
> spec'd out a proxy for NPM)? Did you set your proxy manually when you 
> installed your NPM version?
>
> Good to hear from you buddy
>
> Rich
>
>
>
>
> On Monday, November 12, 2018 at 2:00:57 PM UTC-7, Tito wrote:
>>
>> hello senor Rich
>>
>> check this out
>>
>> https://github.com/npm/npm/issues/17947
>>
>> On Monday, November 12, 2018 at 12:24:50 PM UTC-8, Rich Leach wrote:
>>>
>>> I'm on Mac OSX 10.14 
>>>
>>> I have NPM 6.4.1 and I'm trying to install the Angular CLI, however when 
>>> I run the install command:
>>>
>>> npm install -g @angular/cli
>>> (with or without sudo)
>>>
>>> I get the following error:
>>>
>>> FetchError: request to https://registry.npmjs.org/@angular%2fcli 
>>> failed, reason: connect EPERM 104.16.27.35:443 - Local (0.0.0.0:0)
>>>
>>> at ClientRequest.req.on.err 
>>> (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
>>>
>>> 
>>>
>>>
>>> To solve this I tried:
>>>
>>> • npm cache verify which comes back successful but having affected 0 
>>> bytes of content
>>>
>>> • I tested the url that is reported in the error in my browser (
>>> https://registry.npmjs.org/@angular%2fcli) which does, in fact return 
>>> data
>>>
>>>
>>> Has anyone else run into this? I know the error suggests my firewall or 
>>> proxy could be restricting network access but since I successfully updated 
>>> an additional computer today (with the same config) I know this is not the 
>>> issue
>>>
>>>
>>> Thanks in advance,
>>>
>>>
>>> Rich
>>>
>>>
>>>
>>>

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Issue in loading dynamic components in individual angular tabs

2018-11-12 Thread murali krish
Hi Navaneeth, Am also having same issue. Were you able to fix this out?

On Tuesday, December 19, 2017 at 8:33:23 PM UTC-5, Navaneetha Krishnan S 
wrote:
>
> I have a requirement where I need to load the angular components 
> dynamically inside a (/) tabs. By default when the page loads I wanted to 
> load a component and on some user interaction the other components to be 
> loaded by bubbling the already loaded components event trigger.
>
> The tabs can grow dynamically based on user interaction and each tab would 
> be loaded with a dynamic component in it. It might happen that the same 
> component can be loaded in multiple tabs with different contents being 
> populated based on the @Input parameter being passed into it.
>
> Note:
>
>1. 
>
>I need to pass both @input and @Output parameters i.e. the events can 
>be bubbled out to the parent to do some functionalities etc.
>2. 
>
>When the user switch across the tabs, the components should not reload 
>every time
>
> The problem that I am facing is when I am trying to load components 
> dynamically, its getting loaded in the first tab itself and not in thier 
> respective tabs. Instead the expectation is the second component should be 
> loaded on the second tab and not on the first tab. instead currently all 
> the components are getting loaded in the first tab itself.
>
> I have created a working POC on stackblitz 
>  
> where 
> the same issue can be reproduced
>
> The parent component which hosts the angular tab
>
> @Component({
>   selector: 'home',
>   template: `
>label="{{tab.label}}">
> 
>   
>   {{tab.templateRef}}
>
>   
>   
>   `
> })
> export class HomeComponent implements AfterViewInit {
> activeTabIndex: any;
> cmpRef: ComponentRef;
> @ViewChild('placeholder', { read: ViewContainerRef }) target: 
> ViewContainerRef;
>
> homepageTabs = [
>   {
> label: 'HomeLabel',
> templateRef: null,
> tabTitle: 'HomeTitle'
>   }
> ];
>
> constructor(private cfr: ComponentFactoryResolver)
> {
>   this.activeTabIndex = 0;
> }
>
> ngAfterViewInit() {
>   let factory = this.cfr.resolveComponentFactory(Component1);
>   this.cmpRef = this.target.createComponent(factory);
>   this.cmpRef.instance.CompclickEvent.subscribe((v) => { 
> this.Compclick(v) });
>   //this.homepageTabs.replace()
>   //this.homepageTabs[0].templateRef = this.cmpRef;
> }
>
> Compclick(value: any) {
>   this.activeTabIndex = this.activeTabIndex + 1;
>   console.log("Event bubbled from the child component.");
>   this.addTab("Child " + this.activeTabIndex, this.activeTabIndex);
> }
>
> addTab(tabTitle: any, tabPosition: any): void {
>   let factory = this.cfr.resolveComponentFactory(Component2);
>   this.cmpRef = this.target.createComponent(factory)
>   this.activeTabIndex = tabPosition;
>   this.homepageTabs.splice(tabPosition, 0, {
> label: tabTitle,
> templateRef: this.cmpRef,
> tabTitle: tabTitle
>   });
> }
> }
>
> the First child component is as below
>
> @Component({
>   selector: 'Component1',
>   template: `Component1 Loaded, click on the button to load child 
> component style="float:left" (click)="compclicked()">Click `
> })
> export class Component1 {
>   @Output() CompclickEvent = new EventEmitter();
>   constructor(){
>   }
>
>   compclicked()
>   {
> console.log("Clicked on child component, bubbling the event to the 
> parent");
> this.CompclickEvent.emit();
>   }
> }
>
> What is the mistake I am doing here? why all the components are getting 
> loaded in the first tab itself?
>

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: CLI install error:

2018-11-12 Thread Rich Leach
Hola Tito!

Thanks for the link buddy, I checked it out and it said I should check out 
my proxy settings, but I'm not sure what to set it to (I've never manually 
spec'd out a proxy for NPM)? Did you set your proxy manually when you 
installed your NPM version?

Good to hear from you buddy

Rich




On Monday, November 12, 2018 at 2:00:57 PM UTC-7, Tito wrote:
>
> hello senor Rich
>
> check this out
>
> https://github.com/npm/npm/issues/17947
>
> On Monday, November 12, 2018 at 12:24:50 PM UTC-8, Rich Leach wrote:
>>
>> I'm on Mac OSX 10.14 
>>
>> I have NPM 6.4.1 and I'm trying to install the Angular CLI, however when 
>> I run the install command:
>>
>> npm install -g @angular/cli
>> (with or without sudo)
>>
>> I get the following error:
>>
>> FetchError: request to https://registry.npmjs.org/@angular%2fcli failed, 
>> reason: connect EPERM 104.16.27.35:443 - Local (0.0.0.0:0)
>>
>> at ClientRequest.req.on.err 
>> (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
>>
>> 
>>
>>
>> To solve this I tried:
>>
>> • npm cache verify which comes back successful but having affected 0 
>> bytes of content
>>
>> • I tested the url that is reported in the error in my browser (
>> https://registry.npmjs.org/@angular%2fcli) which does, in fact return 
>> data
>>
>>
>> Has anyone else run into this? I know the error suggests my firewall or 
>> proxy could be restricting network access but since I successfully updated 
>> an additional computer today (with the same config) I know this is not the 
>> issue
>>
>>
>> Thanks in advance,
>>
>>
>> Rich
>>
>>
>>
>>

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[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 create an example for you on the 
phone, but Google got me here, looks good, you just need to adjust  it:
https://stackblitz.com/edit/angular-app-initializer-load-config?file=app%2Fapp.module.ts.

Alternatively, if this doesn't work for you, you can do tricks.
Step 1: Have a catchall route (`path: '**'`) that renders some dummy component 
("Loading, please wait...").
So if you go to root path, you get your app component, and if you go to 
anything else, you land here - and start loading router config.

Step 2: Add a bit of extra work to the loader, tell it to check the router 
state, and if you're at the dummy component, take the url and renavigate to it.

Hope those ideas can give you a hint.

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 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Can we connect to a real database and unit test an angular application using jasmine & karma

2018-11-12 Thread Raghu Ram


Hi,

Please reply me whether we can connect to a real database and unit test an 
angular application using jasmine & karma.

Regards

Raghu Ram

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Can we connect to a real database and unit test an angular application using jasmine & karma

2018-11-12 Thread Tito
what would you have stored in the databases, the string for the actual 
tests?

On Monday, November 12, 2018 at 5:38:53 AM UTC-8, Raghu Ram wrote:
>
> Hi,
>
> Please reply me whether we can connect to a real database and unit test an 
> angular application using jasmine & karma.
>
> Regards
>
> Raghu Ram
>

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] CLI install error:

2018-11-12 Thread Rich Leach
I'm on Mac OSX 10.14 

I have NPM 6.4.1 and I'm trying to install the Angular CLI, however when I 
run the install command:

npm install -g @angular/cli
(with or without sudo)

I get the following error:

FetchError: request to https://registry.npmjs.org/@angular%2fcli failed, 
reason: connect EPERM 104.16.27.35:443 - Local (0.0.0.0:0)

at ClientRequest.req.on.err 
(/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)




To solve this I tried:

• npm cache verify which comes back successful but having affected 0 bytes 
of content

• I tested the url that is reported in the error in my browser (
https://registry.npmjs.org/@angular%2fcli) which does, in fact return 
data


Has anyone else run into this? I know the error suggests my firewall or 
proxy could be restricting network access but since I successfully updated 
an additional computer today (with the same config) I know this is not the 
issue


Thanks in advance,


Rich



-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Migrating from angular 6 to 7 breaks grid on IE

2018-11-12 Thread JRPG Gamer
Hi i tried migrating from angular 6 to 7 and now my grid is not displaying 
correctly.  In chrome everything is as it should be.  But in IE each 
section has its own row which is not what is intended.  here is what i used 
for the css.  does anyone have an idea on how to fix this or should i 
revert back to 6?

main {
display: grid;
grid-template-areas:
". . ."
"nav section aside"
". . .";
grid-template-rows: 0px 1fr 0px;
grid-template-columns: 60px 1fr 300px;

height: 100vh;
}

nav {
grid-area: nav;
}

section {
grid-area: section;
}

aside {
grid-area: aside;
}

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: CLI install error:

2018-11-12 Thread Tito
hello senor Rich

check this out

https://github.com/npm/npm/issues/17947

On Monday, November 12, 2018 at 12:24:50 PM UTC-8, Rich Leach wrote:
>
> I'm on Mac OSX 10.14 
>
> I have NPM 6.4.1 and I'm trying to install the Angular CLI, however when I 
> run the install command:
>
> npm install -g @angular/cli
> (with or without sudo)
>
> I get the following error:
>
> FetchError: request to https://registry.npmjs.org/@angular%2fcli failed, 
> reason: connect EPERM 104.16.27.35:443 - Local (0.0.0.0:0)
>
> at ClientRequest.req.on.err 
> (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
>
> 
>
>
> To solve this I tried:
>
> • npm cache verify which comes back successful but having affected 0 bytes 
> of content
>
> • I tested the url that is reported in the error in my browser (
> https://registry.npmjs.org/@angular%2fcli) which does, in fact return 
> data
>
>
> Has anyone else run into this? I know the error suggests my firewall or 
> proxy could be restricting network access but since I successfully updated 
> an additional computer today (with the same config) I know this is not the 
> issue
>
>
> Thanks in advance,
>
>
> Rich
>
>
>
>

-- 
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.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.