angular-cli-v6

Installing NPM packages in angular 6 workspace

孤者浪人 提交于 2021-02-07 12:56:24
问题 I am just picking up Angular 6 and CLI and have created a project as below ng new my-demo cd my-demo ng g library foo --prefix=my No in my library I want to add ngx-bootstrap as the component will need the DropdownButtonModule so my question is how do I go about installing the npm package for the library? I would previously have just run npm install ngx-bootstrap but this will now install the package for the application, however, I need this installed for the library. Should I be cd'ing to

Invalid JSON character when running ng serve

不羁的心 提交于 2020-12-02 06:46:18
问题 I am getting following error when running ng serve... PS F:\Projects\RecipeApp> ng serve Invalid JSON character: "\"" at 76:13. Error: Invalid JSON character: "\"" at 76:13. at _token (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:63:19) at _readArray (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:316:9) at _readValue (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:561:22) at _readProperty (F:\Projects

ng serve issue on Ubuntu 16.04

只愿长相守 提交于 2020-06-28 06:01:56
问题 I've installed AngularCLI (Angular6) on Linux Ubuntu 16.04 with regular way. then I've tried to serve my app with ng serve --open But the terminal became as the screenshot below: I want to know what is this error or issue about and how can I solve it? 回答1: It's just a permission problem. Just use sudo for superuser. sudo npm install -g @angular/cli 来源: https://stackoverflow.com/questions/51603464/ng-serve-issue-on-ubuntu-16-04

This version of CLI is only compatible with Angular version 5.0.0 or higher error

我与影子孤独终老i 提交于 2020-06-11 05:06:35
问题 I already had angular project that ran in 4 version. While installing new project, unfortunately i have installed 6 version of angular cli. This throw me an error 'Your global Angular CLI version is greater than your local version' while running ng serve command in old project that ran in 4 version. Again i tried to update my anglar local version. But now i have got an error This version of CLI is only compatible with Angular version 5.0.0 or higher. My package.json is following: { "name":

This version of CLI is only compatible with Angular version 5.0.0 or higher error

浪尽此生 提交于 2020-06-11 05:06:18
问题 I already had angular project that ran in 4 version. While installing new project, unfortunately i have installed 6 version of angular cli. This throw me an error 'Your global Angular CLI version is greater than your local version' while running ng serve command in old project that ran in 4 version. Again i tried to update my anglar local version. But now i have got an error This version of CLI is only compatible with Angular version 5.0.0 or higher. My package.json is following: { "name":

This version of CLI is only compatible with Angular version 5.0.0 or higher error

て烟熏妆下的殇ゞ 提交于 2020-06-11 05:06:07
问题 I already had angular project that ran in 4 version. While installing new project, unfortunately i have installed 6 version of angular cli. This throw me an error 'Your global Angular CLI version is greater than your local version' while running ng serve command in old project that ran in 4 version. Again i tried to update my anglar local version. But now i have got an error This version of CLI is only compatible with Angular version 5.0.0 or higher. My package.json is following: { "name":

Angular CLI 6: Where to put library dependencies

萝らか妹 提交于 2020-04-29 05:40:06
问题 I'm converting a library (ng-app-state) to use the angular cli, now that v6 supports libraries (yay!). After scaffolding and copying in some code, here is my first question: How/where do I add 3rd party dependencies? To package.json , or to projects/ng-app-state/package.json ? 回答1: Turns out the answer is kind of "both". Understanding the answer comes from this: package.json is what will be used during development. You actually install all your libraries here for your own use, including the

Angular CLI 6: Where to put library dependencies

可紊 提交于 2020-04-29 05:37:05
问题 I'm converting a library (ng-app-state) to use the angular cli, now that v6 supports libraries (yay!). After scaffolding and copying in some code, here is my first question: How/where do I add 3rd party dependencies? To package.json , or to projects/ng-app-state/package.json ? 回答1: Turns out the answer is kind of "both". Understanding the answer comes from this: package.json is what will be used during development. You actually install all your libraries here for your own use, including the

Angular Module vs. Library

人走茶凉 提交于 2020-01-23 12:06:32
问题 So great, the Angular has released version 6 and the CLI provides an option to generate libraries - something that they call a "highly anticipated feature". Now, coming from a business perspective, I am wondering: why you would actually need this, why inside of an existing project and not a separate which you can install as usual via npm... and if you want this inside your project, why not use a module for that. So I get it, publish something on npmjs and hope the whole world and future

RouterLink is not working in Angular 6

你说的曾经没有我的故事 提交于 2020-01-05 07:04:33
问题 I was coding watching a Brad Traversy tutorial. and I did exactly as it is said. this is my 'app.module.ts'. import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; import { AppComponent } from './app.component'; import { NavbarComponent } from './components/navbar/navbar.component'; import { LoginComponent } from './components/login/login.component'; import { RegisterComponent } from '.