# 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

## How to access angular 2 module from npm by its name

I have published an angular 2 library of my own into npm. It is giving me errors when I tried to access the module like this import {MyModule} from ‘my-module’ but it works like this import {MyModule} from ‘node_modules/my-module/my-module.module. So my question is how to access it with the module name. 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

## Angular Flexlayout

Rightnow we are using bootstrap for responsive design for our angular components, Planning to migrate to angular flexlayout. Would like to get more inputs (pros and cons)before we proceed. 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 […]

## ui-grid second col can edit or not judge by first col ‘s value

enter image description here 1.The request is weather the ‘tax_amount’ column need to be filled in or not decide by the first column: ‘tax_type’, ex: tax_type = 1, tax_amount can edit, tax_type = 2, tax_amount can’t edit. can ui-grid do this requirement ? Source: AngularJS