refactor: remove not-needed animations

This commit is contained in:
Roman Hotsiy 2017-04-30 14:29:44 +03:00
parent ef1b2bd19e
commit 9ea672d921
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
5 changed files with 2 additions and 17 deletions

View File

@ -1,12 +1,11 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RedocModule } from './redoc.module';
import { Redoc } from './components/index';
@NgModule({
imports: [ BrowserModule, BrowserAnimationsModule, RedocModule ],
imports: [ BrowserModule, RedocModule ],
bootstrap: [ Redoc ],
exports: [ Redoc ]
})

View File

@ -7,7 +7,7 @@
<polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "/>
</svg>
</label>
<ul *ngIf="item.items" class="menu-subitems" [@itemAnimation]="(item.active || item.isGroup) ? 'expanded' : 'collapsed'">
<ul *ngIf="item.items" class="menu-subitems">
<side-menu-items [items]="item.items" (activate)="activateItem($event)"> </side-menu-items>
</ul>
</li>

View File

@ -22,17 +22,6 @@ const global = window;
selector: 'side-menu-items',
templateUrl: './side-menu-items.html',
styleUrls: ['./side-menu-items.css'],
animations: [
trigger('itemAnimation', [
state('collapsed, void',
style({ height: '0px' })),
state('expanded',
style({ height: '*' })),
transition('collapsed <=> expanded', [
animate('200ms ease')
])
])
]
})
export class SideMenuItems {
@Input() items: MenuItem[];

View File

@ -50,7 +50,6 @@
"author": "Roman Hotsiy",
"license": "MIT",
"devDependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/compiler-cli": "^4.0.0",

View File

@ -23,7 +23,6 @@ var ErrorHandler = require('@angular/core').ErrorHandler;
var forwardRef = require('@angular/core').forwardRef;
var BrowserDynamicTestingModule = require('@angular/platform-browser-dynamic/testing').BrowserDynamicTestingModule;
var platformBrowserDynamicTesting = require('@angular/platform-browser-dynamic/testing').platformBrowserDynamicTesting;
var BrowserAnimationsModule = require('@angular/platform-browser/animations').BrowserAnimationsModule;
var SpecManager = require('../lib/utils/spec-manager').SpecManager;
var services = require('../lib/services/index');
var REDOC_PIPES = require('../lib/utils/pipes').REDOC_PIPES;
@ -39,7 +38,6 @@ TestBed.initTestEnvironment(
beforeEach(function() {
TestBed.configureTestingModule({
imports: [BrowserAnimationsModule],
providers: [
SpecManager,
services.AppStateService,