Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source code for the demo #13

Open
timfogarty1549 opened this issue Aug 29, 2016 · 2 comments
Open

source code for the demo #13

timfogarty1549 opened this issue Aug 29, 2016 · 2 comments

Comments

@timfogarty1549
Copy link

timfogarty1549 commented Aug 29, 2016

Being able to view the source code for the demo would be helpful.

for example, when you change the input text boxes for the start and end value, the slider changes, but it is not apparent how you are doing it. when I try the angular 2 way of binding with [startValue]="startValue" where the also binds to the variable startValue, I get "Can't bind to 'startValue' since it isn't a known property of 'ng2-slider'." which is an RC5 message. Same with min, max and endValue.

Speaking of RC5, an ngModule is needed.

@timfogarty1549
Copy link
Author

timfogarty1549 commented Aug 30, 2016

I got it to work, mostly. Created an ngModule, ng2-slider.module.ts. Directives declarations need to be taken out of component.

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';

import {Ng2SliderComponent} from './ng2-slider.component';
import {SlideAbleDirective} from 'ng2-slideable-directive/slideable.directive';
import {Ng2StyledDirective} from 'ng2-styled-directive/ng2-styled.directive';

@NgModule({
    imports: [ 
        CommonModule,
        FormsModule,
    ],
    declarations: [
        SlideAbleDirective, 
        Ng2StyledDirective,
        Ng2SliderComponent,
    ],
    exports: [ 
        Ng2SliderComponent,
        Ng2StyledDirective
    ]
})
export class Ng2SliderModule {}

Styling is not working. Perhaps ng2-styled needs similar changes for RC5

@chris9753
Copy link

chris9753 commented Sep 1, 2016

not quite sure if this is related,but i'm on rc4 and i noticed if i use any input it binds the first time but does check for input changes.... i.e [value]="someDynamicValue", [startValue]="someDynamicValue"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants