ThanksIt's in Visual Code and the directive hideFabOnscroll is from my plugin and its working as expected . I think I'm missing something ,curious to know the it.
Asked
Active
Viewed 148 times
0

Sachin
- 2,627
- 1
- 19
- 35
-
It's really not clear what your question is here. – Claies Dec 24 '17 at 18:06
-
@Claies updated , is it clear enough? – Sachin Dec 24 '17 at 18:14
-
It seems like you are using a directive like it's a bindable property; you are getting the error because there isn't a property in `ion-header` to bind `scrollingHeader` to. Does it work if you just declare it as an attribute, i.e. remove the `[ ]`? – Claies Dec 24 '17 at 18:22
-
@Claies , no it's not working. `[ ]` is needed for property binding to work right ? – Sachin Dec 24 '17 at 18:34
-
yes, but there isn't a property `scrollingHeader` on the `ion-header` component. What does the directive *do*, exactly? – Claies Dec 24 '17 at 18:35
-
@Claies , `scrollingHeader` is a directive which takes the `content`(reference of ion-content) as `input` and hides the header according to `scroll` event in `ion-content` . – Sachin Dec 24 '17 at 18:39
-
so it doesn't try to pass any data into `ion-header` then.... so it's not really clear why you would be trying to use it like you are. it doesn't sound to me like the directive is written correctly, but I don't have any code for it to evaluate. – Claies Dec 24 '17 at 18:40
-
@Claies , it's just an attribute directive dude , I need to hide `ion-header` element , that's y I added it to `ion-header`. – Sachin Dec 24 '17 at 18:44
-
right, but you wrote this code like you were passing the value `'content'` **into** a property `scrollingHeader` **inside** the `ion-header` Component, but that property doesn't exist, which is why the IDE complains. if the directive still manages to work, it's because it doesn't actually rely on that non-existent property, but that doesn't mean it's not declared wrong.... – Claies Dec 24 '17 at 18:47
-
attribute directives don't normally use binding, which is why I asked if it worked if you remove the braces. Perhaps you could describe the error you get when you don't supply the braces? – Claies Dec 24 '17 at 18:49
-
It actually seems like you are trying to bind to an `@input` alias inside the `scrollingHeader` directive, but something isn't quite right with how the IDE is interpreting that syntax. Again, it seems like we need to see the code of the directive. – Claies Dec 24 '17 at 18:51
-
@Claies, removing braces will break the entire logic and I'm not handling that part well inside the library . I created the library as a umd file and added it to property `main` in it's `package.json` and I'm importing it from node_modules after installing it locally. But the IDE is not recognising this directive as a part of that module . I think Im missing something . – Sachin Dec 24 '17 at 18:56
-
I tried to help clarify the problem, but without seeing code (and only seeing a screenshot), all I (and others) can do is offer guesses. I'm not sure my comments help clarify anything at all about what might be going on. Good luck figuring out what is wrong; I still suspect the directive code is wrong but until I can see that code, I can't offer anything else. – Claies Dec 24 '17 at 18:59
-
@Claies , here you go https://github.com/keephacking/ionic-hide-fab-onscroll (this is a simple directive one with same error) – Sachin Dec 24 '17 at 19:02