Closed Steve-A-Orr closed 7 years ago
Nice refactoring. That icon is oddly hard to assign to a variable isn't it. I avoided client side for so long I assumed I was missing something obvious. As for the name lib-app, it was generic on purpose but may or may not make sense for this repository. Long term in my own implementation I see this as one of many potential components that all fall under the library-app umbrella. It might be good to leave it that way as a gateway to angular2 for other who want to have a go at adding their own components to a fork of this. Ideally, we could get some people with existing angular2 apps to comment on how it could be structured to better integrate into existing applications. Apparently I might have to learn how to use git submodules :) At least I think they will help with this problem.
Declare variables (for scope/tab text & Primo URL) in TS so that a campus can customize in one place; then use those values both in the TS and HTML code. (Really struggled with passing in that search icon HTML through a variable, to avoid that repeated code in the HTML, but it beat me up and I retreated.)
Chose to re-indent code for readability--frankly, so that I could ensure I wasn't messing anything up. I'm not well-versed in Angular2, so I can't provide other best practices before releasing this to the rest of the CSU.
I was wondering why you called it "LibApp" rather than "OneSearch-Local" or something more descriptive...but that is just an opinion. I'm going to follow up later with you for some advice about styling, because I am a little confused. Thanks for sharing your code.