Search Posts

Category: angular

Running "ng serve" with angular CLI first time wont compile right and gives an error

So I am trying to start my first project in angular. And every time it won’t compile like it won’t do ng serve and complete it without an error, it is hard to explain I hope you forgive that with me on that. Basically, Im running node-v9.1.0 and npm-v5.5.1 on Windows 10 Pro 64bit Commands I used is npm install -g @angular/cli & ng new ngvic and the cd into the folder and using ng […]

Getting Error While Adding Font to an Angular 5 Project

I am new to Angular 5.I tried to add an new font for my project.I created a ‘assets’ folder in root directory and created ‘fonts’ and ‘images’ folder under assets folder.I referred an image from images folder in my project by the same way i tried to refer an font.Images are getting referred but fonts are not working for me.I am getting an error like ‘NodeInvocationException: Prerendering failed because of error: Error: Cannot find module […]

phpstorm angular subscribe – unresolved variable

i use phpstorm do develope an angular app and now i have an “unresolved variable” error at params.myid here the code line: this.route.params.subscribe((params: Params) => { const avalancheid = params.myid; }); there is no error if i change the type to “any” instead of “Params” this.route.params.subscribe((params: any) => { const avalancheid = params.myid; }); Angular version: 4.2.4, Php storm version: 2017.2.4 Source: AngularJS

Adding angular.module([‘nghandsontable’]) now my ui-select are gone

I have a issues when i add this line of code var mainApp = angular.module(‘adminApp’, [‘ngHandsontable’]); to my controller all my dropdowns (ui-select) disappear. My controller looks like this mainApp.controller(“fixturesController”, [“$scope”, “$http”, “$q”, function ($scope, $http, $q) { Does anyone know why it would break all my ui-select’s? Source: AngularJS

Splitting SPA (Angular 1.x) app in multiple bundles/pages/apps

I have an Angular 1.x SPA app that has grown to 200+ templates (and growing) and it starts to feel too big for a monolithic app. Aside from all performance issues related to this size, I have a problem that upgrading infrastructure/components/libraries is an all-or-nothing operation. The app has several well identifiable modules (4-10 depending on the granularity I choose) ie. public part, account administration, user area… Users rarely “cross” from one area to another. […]

Angular Http Observable doesn’t update

Hey Guys i wrote a little backend which returns some data. Now i want to fetch this data with Angular Http and show new values when i post them in the backend. So the first thing that came to my mind were Observables but currently i can fetch the data onInit but when Posting new Data to the Backend (currently just via Postman) the Fetched data wont update. So if this is the wrong approach […]

Angular AOT compiler can’t find project-relative paths within components

I’m in the (painful) process of AOT-ing an app I’ve been making, but have hit a bit of a hurdle when it comes to specifying URL’s for the components. Works in AOT, but not JIT 😖 @Component({ selector: “home-page”, templateUrl: “./home.html”, styleUrls: [“./home.css”] }) Works in JIT, but not AOT 😖 @Component({ selector: “home-page”, templateUrl: “pages/home/home.html”, styleUrls: [“pages/home/home.css”] }) Question Why does the AOT Compiler resolve paths from the component root, whereas the JIT compiler […]

Next Page »