1
Ich versuche, Drag & Drop (https://github.com/akserg/ng2-dnd) in Angular-Projekt zu implementieren.ng2-dnd mit Angular 4
Meine config (ng -v
):
@angular/cli: 1.1.3
node: 6.10.1
os: win32 x64
@angular/animations: 4.2.4
@angular/common: 4.2.4
@angular/compiler: 4.2.4
@angular/core: 4.2.4
@angular/forms: 4.2.4
@angular/http: 4.2.4
@angular/platform-browser: 4.2.4
@angular/platform-browser-dynamic: 4.2.4
@angular/router: 4.2.4
@angular/cli: 1.1.3
@angular/compiler-cli: 4.2.4
@angular/language-service: 4.2.4
Meine Schritte:
- neues Projekt anlegen:
ng new myProject --style=sass
- installieren NG2-dnd:
npm install ng2-dnd --save
- Import DndModule in meine NgModule:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { DndModule } from 'ng2-dnd';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
DndModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
- Import style.css von node_modules
Nach diesen Schritten, füge ich eine Vorlage nur wie bei Github, aber ohne Ergebnis. Ich sehe nur reinen Text, auch ohne Stil.
Was mache ich falsch?
importieren sollten Können Sie Ihre Repo-Post an GitHub? – cgatian
wo hast du Style importiert? – CharanRoot
Ich importierte Stil in angular-cli.json, Hier ist mein Code: https://github.com/pawelidziak/my-todo-list –