Search Posts

Category: angular2-routing

scroll to a section and highlight the menu

Hi everyone I’m working on angular 2 and i was trying to do method which is, when I scroll the body and I get to section 1 it should highlight the menu bar, so on. please can anyone help me with this, thank you addEventScrolling(){ document.getElementById(‘manufact’).onscroll = () => { } } <nav> <ng-container *ngIf=”manufact”> <ng-container *ngFor=”let key of Object.keys(manufact); let i = index”> <li>car</li> <li>bike</li> <li>van</li> <li>trank</li> <li>boat</li> </ng-container> </ng-container> <br> <div class=”car” id=”sect1″>simply […]

I am getting an error : bootstrap.min.css not found (404 ). This error is coming for all the css and fonts

When I am starting my project it is giving me error 404 for all the CSS and Fonts in projects.I have given CSS and fonts link in index.html and I have tried in angular-cli.json also but it’s not working. index.html : <!– Stylesheets –> <link rel=”stylesheet” href=”../src/css/bootstrap.min.css”> <link rel=”stylesheet” href=”../src/css/bootstrap-datepicker.min.css”> <!–<link rel=”stylesheet” href=”../src/css/star-rating.min.css” /> <link rel=”stylesheet” href=”../src/css/slicknav.css”>–> <link rel=”stylesheet” href=”../src/css/superfish.css”> <!–<link rel=”stylesheet” href=”../src/css/animate.css”> <link rel=”stylesheet” href=”../src/css/jquery.bxslider.css”> <link rel=”stylesheet” href=”../src/css/hover.css”> <link rel=”stylesheet” href=”../src/css/magnific-popup.css”> <link rel=”stylesheet” href=”../src/css/owl.carousel.min.css” […]

router.navigate not working properly with guards

I have 2 routes in my app: ‘/auth’, with the guard IsNotLoggedIn. ‘/main’, with the guard IsLoggedIn. inside ‘/auth’ i have 2 child routes: 1. ‘landing’ – a page that has a button that leads to the login page. 2. ‘login’ – a simple login page inside ‘/main’ i have 1 child route: 1. ‘home’ – my home page. In my root route ‘/’ I redirect to ‘/auth’, there the IsNotLoggedIn guard checks if the […]

Getting plugin issue

I just upgraded ionic version from 2.2.3 to 3.0. when am trying to run my ionic v1 projects on this setup, am getting error. so I downgraded to old set up but still am getting the same error. Please look into the screens and let me know to fix this issue.Commands used to run Source: AngularJS

Maintain the user selection (ex : department) in session and throughout the angular application

User mapped to many departments which contains several items. While user logs in , he can select any one department (say dropdown) and then show respective items to the user. Application has more than five tabs(angular routing),in each tab i have to maintain the selection of department and throughout the session also (here we are using adfs login). So how can i proceed this in angular 2 ? Angular router parameter is enough for this. […]

Serving two different angular apps at one domain with wildcard in path

Say I have a Dog app written in AngularJS and I’m now adding a new Grooming sub-app written in Angular4 Right now I have nginx serving /api to a backend php server with the /api prefix rewritten off (so it doesn’t know it’s in a sub-path) and / served by the frontend AngularJS app. These are two distinct apps, each in their own server directory. This works fine right now. Now we are adding a […]

Dynamic Routes loading throwing error "No Factory found"

Hi I am trying to load routes dynamically returned by API server. But I get error “No Component factory found for component”.I have my components added in entryComponent here is my code. error: Uncaught (in promise): Error: No component factory found for ParentComponent. Did you add it to @NgModule.entryComponents? Error: No component factory found for ParentComponent. Did you add it to @NgModule.entryComponents? at noComponentFactoryError (core.es5.js:3202) at CodegenComponentFactoryResolver.webpackJsonp…/../../core/@angular/core.es5.js.CodegenComponentFactoryResolver.resolveComponentFactory (core.es5.js:3267) at RouterOutlet.webpackJsonp…/../../router/@angular/router.es5.js.RouterOutlet.activateWith (router.es5.js:5614) at ActivateRoutes.webpackJsonp…/../../router/@angular/router.es5.js.ActivateRoutes.activateRoutes (router.es5.js:4749) at […]