angular6

Unable to reorder columns in angular ngx-datatable

 ̄綄美尐妖づ 提交于 2019-12-03 22:21:37
I am working on angular ngx-datatables, where I need to achieve its column reorder functionality. But its not working(not getting any error), also column's width is not changing on dragging the line. I have added below css files in angular.json file. Do it require any js file? "node_modules/@swimlane/ngx-datatable/release/components/datatable.component.css", "node_modules/@swimlane/ngx-datatable/release/themes/material.css", "node_modules/@swimlane/ngx-datatable/release/themes/dark.css", "node_modules/@swimlane/ngx-datatable/release/assets/icons.css" I am following this link. @Component({

Google Maps compatibility IE11 not working because of polyfills.js

浪子不回头ぞ 提交于 2019-12-03 22:13:08
My app website is not working fine on IE11. The website is not loading, it gives me a blank page This is the error thrown on IE11 : SCRIPT5005: String expected js (26,286) SCRIPT5022: Exception thrown and not caught. polyfills.js (3234,3) I'm enclosing the screen capture on on the console I have included the API in my index.html like this : <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=API_KEY"></script> It should include googlemaps after my polyfills.js, but I'm not sure on how to do that I've tried to use agm-map, and others solutions but so far, nothing is

Angular 6 Boilerplate with only Basic Features (Required all the time)?

不想你离开。 提交于 2019-12-03 21:00:56
I Setup Angular all the time with new Project. Anyone can suggest good boilerplate where no need to develop Basic required features which are required most of the times in a application. JWT Authentication in Angular 6 Bootstrap/Material Design setup in Angular 6 Http Services in Angular 6 File Uploading in Angular 6 Basic CRUD in Angular 6 Please suggest. It will save my lot of time. You can follow this boilerplate https://github.com/brnrajoriya/Angular-Ready-To-Use-Boilerplate Just clone this project and run npm install and you got all necessary components and a CRUD with JWT authentication

Angular 6 router.events.filter 'filter' does not exist on type 'Observable<Event>'

巧了我就是萌 提交于 2019-12-03 19:07:02
问题 I have finished to update my App to Angular 6 (it was in 5.2 version). I got an error syntax in : import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; import { filter } from 'rxjs/operators'; ... constructor(private router: Router) {} this.router.events.filter (event => event instanceof NavigationEnd).subscribe((res) => { // DO something }); error TS2339: Property 'filter' does not exist on type 'Observable'. what's the right syntax in Angular 6 ? thanks 回答1: This is how

What is the equivalent to AngularJS's ngcookie in Angular 6? [closed]

只谈情不闲聊 提交于 2019-12-03 18:48:55
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 months ago . How can you create cookies in Angular 6? For AngularJS there was ngcookie . What is the equivalent way to create cookies in Angular 6? 回答1: You can use this node package for it ngx-cookie-service 回答2: npm install ngx-cookie-service --save Add to your module: import {

Error during dynamic form creation from json Cannot find control with name: 'data'

筅森魡賤 提交于 2019-12-03 16:19:12
I am using angular 7 appplication and i am writing a generic dynamic form creator. I am using reactive forms and ng-template and <ng-container *ngTemplateOutlet> for recursively displaying the form element.The code of the project could be seen Here . But i am facing the following error ERROR Error: Cannot find control with name: 'data' at _throwError (forms.js:1775) at setUpControl (forms.js:1683) at FormGroupDirective.push../node_modules/@angular/forms/fesm5/forms.js.FormGroupDirective.addControl (forms.js:4532) at FormControlName.push../node_modules/@angular/forms/fesm5/forms.js

How can I disable AOT in angular2?

可紊 提交于 2019-12-03 15:31:04
I got something like this: ng build --prod --no-aot But I am not able to understand what is the difference between ng build --prod and ng build --prod --no-aot Update: For Angular 6 Use the following command to disable AOT mode: $ ng build --prod --aot=false --build-optimizer=false Bhavani Raju Just run command ng build -prod -aot=false . This will disable the aot compiler. The flag --prod does the AOT compilation by default. If you want to build without AOT then simply run ng build only without any flag. 来源: https://stackoverflow.com/questions/45814758/how-can-i-disable-aot-in-angular2

angular6 feature module lazy loading throwing error TypeError: undefined is not a function

纵然是瞬间 提交于 2019-12-03 14:38:09
问题 I have this code in app-routing.module.ts , as per the new documentation in angular I went through the method still it's not working, throwing some errors I can't understand. import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule, Routes } from "@angular/router"; import { HomeComponent } from "./home/home.component"; import { AdminModule } from "./admin/admin.module"; const routes: Routes = [ { path: 'admin', loadChildren: './admin

Can I have angular library that emits Angular elements in single js file?

人走茶凉 提交于 2019-12-03 13:27:23
问题 I'm starting to get into the angular 6 bits, and am very interested in Angular Elements as well as the new library projects. I have an upcoming project that will probably need both these new features. I have the need to create custom UI components that are reusable across web frameworks, but I'd also like to have first class support for using them in angular projects. I've followed this tutorial and have an angular6 app that registers custom elements, and concats the webpack bundles in a

How to filter a mat-tree component Angular Material 6.0.1

拟墨画扇 提交于 2019-12-03 12:58:03
问题 I'm using mat-tree angular material component. It's a nice component with some very useful features like, multi-select, expand all/collapse all. I was not able to find any tree filtering feature in any of their APIs. Has anyone came across this feature or done any work around to get mat-tree filter? 回答1: I solved the problem by creating a new data source(filtered). stackblitz sample I will explain the example of the shared link: I filtered the data with filter(filterText: string) in