Comments (15)
Hi Tom
Can you elaborate:
- the folders structure of the project?
- the content of new window.html file?
Regards,
Sergey.
On 10 March 2014 19:26, Tom [email protected] wrote:
Hi!
I see, for things like the modal window component, you can pass the
template or templateUrl for the content within the modal window
(window.html's content area)...but I'd also like to be able to pass the
template URL for window.html itself.My project sits inside another site/project and since modal.dart has
packages/angular_ui/modal/window.html but I actually need it as
/packages/angular_ui/modal/window.html to work.Perhaps as simple as passing the an attribute to
itself? I know there's two templates here
and to make it less confusing the developer should only need to pass what
they want inside the actual modal...I hear that, but in special
circumstances here, one may have the need to path the window.htmltemplate (among other internal templates I suppose) differently...Or
completely replace it.Perhaps this is already possible in some way that I'm not clearly
understanding as well. Any thoughts on this issue would be appreciated.
Thanks!Reply to this email directly or view it on GitHubhttps://github.com//issues/47
.
from angular.dart.ui.
In my case the window.html file remains unchanged. I just needed to prepend a / on there (to the path for the actual templateUrl). However, if I wanted to change the HTML structure of that modal window (say Bootstrap updates or something)... I couldn't as is... At least I don't think I can.
from angular.dart.ui.
We will update the code because Bootstrap will changed in future. You don't
need to worry about that.
I confused about folders structure of your project. The 'packages' folders
usually exists in root of application and it follows you requirements. What
the real problem do you have? Would you show example?
On 10 March 2014 22:51, Tom [email protected] wrote:
In my case the window.html file remains unchanged. I just needed to
prepend a / on there. However, if I wanted to change the HTML structure of
that modal window (say Bootstrap updates or something)... I couldn't as
is... At least I don't think I can.Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-37232645
.
from angular.dart.ui.
I haven't tried it myself but I think this can be used to accomplish what
you want:
https://github.com/angular/angular.dart/blob/master/lib/directive/ng_template.dart
This should work to replace the default template with a custom one.
As far as I know it works this way:
- check the cache if the template is there
- if not load it from the server
- when ng-template loads a template for a specific URL into the template
cache before the default behavior takes place, this template should be used
instead.
I could be completely wrong though (as I said I never actually used it
myself).
If it doesn't work just create a question on StackOverflow.
There was also a StackOverflow question about a similar use case
http://stackoverflow.com/questions/20890392
I also don't know the modal component, so the comments/suggestions from
Sergey may be a better answer.
Cheers
Günter
Mit freundlichen Grüßen
Günter Zöchbauer
[email protected]
+43 (699) 10 18 87 15
On Tue, Mar 11, 2014 at 5:41 AM, Sergey Akopkokhyants <
[email protected]> wrote:
We will update the code because Bootstrap will changed in future. You don't
need to worry about that.
I confused about folders structure of your project. The 'packages' folders
usually exists in root of application and it follows you requirements. What
the real problem do you have? Would you show example?On 10 March 2014 22:51, Tom [email protected] wrote:
In my case the window.html file remains unchanged. I just needed to
prepend a / on there. However, if I wanted to change the HTML structure
of
that modal window (say Bootstrap updates or something)... I couldn't as
is... At least I don't think I can.Reply to this email directly or view it on GitHub<
https://github.com/akserg/angular.dart.ui/issues/47#issuecomment-37232645>.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-37262864
.
from angular.dart.ui.
I didn't try these solutions myself, but Tom can use that solution and
others if he wants.
Just try and let us know.
On 11 March 2014 11:49, Günter Zöchbauer [email protected] wrote:
I haven't tried it myself but I think this can be used to accomplish what
you want:https://github.com/angular/angular.dart/blob/master/lib/directive/ng_template.dart
This should work to replace the default template with a custom one.
As far as I know it works this way:
- check the cache if the template is there
- if not load it from the server
- when ng-template loads a template for a specific URL into the template
cache before the default behavior takes place, this template should be
used
instead.I could be completely wrong though (as I said I never actually used it
myself).
If it doesn't work just create a question on StackOverflow.There was also a StackOverflow question about a similar use case
http://stackoverflow.com/questions/20890392I also don't know the modal component, so the comments/suggestions from
Sergey may be a better answer.Cheers
GünterMit freundlichen Grüßen
Günter Zöchbauer
[email protected]
+43 (699) 10 18 87 15On Tue, Mar 11, 2014 at 5:41 AM, Sergey Akopkokhyants <
[email protected]> wrote:We will update the code because Bootstrap will changed in future. You
don't
need to worry about that.
I confused about folders structure of your project. The 'packages'
folders
usually exists in root of application and it follows you requirements.
What
the real problem do you have? Would you show example?On 10 March 2014 22:51, Tom [email protected] wrote:
In my case the window.html file remains unchanged. I just needed to
prepend a / on there. However, if I wanted to change the HTML
structure
of
that modal window (say Bootstrap updates or something)... I couldn't
as
is... At least I don't think I can.Reply to this email directly or view it on GitHub<
https://github.com/akserg/angular.dart.ui/issues/47#issuecomment-37232645>
.
Reply to this email directly or view it on GitHub<
https://github.com/akserg/angular.dart.ui/issues/47#issuecomment-37262864>.
Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-37278319
.
from angular.dart.ui.
Ok, cool. So this will basically let me define the template for any directive? That'll work. I didn't realize that value could be set from outside the directive/component itself. I'll give this a try soon here.
from angular.dart.ui.
Sorry it took me a while to try this...But I can't seem to make it work. I've tried ng-template="/path/to/template.html"
as well as type="text/ng-template" id="/path/to/template.html"
and neither seemed to work.
Though this is exactly what I'd be looking for in the <modal-window>
directive - some sort of attribute that could be set to change the template. I just don't think the NgTemplate directive will do it. It unfortunately only seems to only work on <template>
and <script>
elements.
In my compiled JavaScript, I found that I only have two places to add a slash...So it's not a huge issue, but it adds an extra step to deployment that's easy to forget.
from angular.dart.ui.
Did you also try the URL rewrite solution from the linked StackOverflow question?
from angular.dart.ui.
Trying...but having trouble. It can't seem to find the rewriter class I setup (following along with the example it is actually called MyUrlRewriter
). I've put it in the Injectables
constants as well and have re-run the generators. It just says Uncaught Unsupported operation: Cannot find class for: MyUrlRewriter
from angular.dart.ui.
Did you add MyUrlRewriter
to your module? type(MyUrlRewriter)
from angular.dart.ui.
Yes, with:
class MyAppModule extends Module {
MyAppModule() {
type(UrlRewriter, implementedBy: MyUrlRewriter);
...
from angular.dart.ui.
Can you make the application (stripped down if possible) available on a GitHub repo than I could take a look.
from angular.dart.ui.
Hi Tom.
Is you question still actual for you?
from angular.dart.ui.
I'd have to update my project to see. It's been a while since I've worked with it, though this is bug fix week for me and I should be working with it again. I'll post back if this is still and issue, but if you want to close it you can.
I'd still like to see more flexibility in the template pathing though. I think a simple attribute to change that would be a lot better than using some hack with the UrlRewriter.
from angular.dart.ui.
Ok. I close that issue.
If you problem still exists - let me know.
Don't forget attach reference on source code if it publicly available or send issue with code snippet so we can talk more constructive.
Regards,
Sergey.
from angular.dart.ui.
Related Issues (20)
- Chrome unable to find index.dart.js HOT 9
- Typeahead popover position incorrect when used in table cell. HOT 3
- Dropdown menus in scrollable areas HOT 5
- Accordion: fast clicks on title causes inconstent state or bad rendering HOT 4
- Accordion: ng-repeat on accordion-group does not refresh the view when the model changes HOT 3
- Carousel error -> slides are one below the other HOT 5
- Combine slide and angular css files HOT 1
- Accordion: accordion-heading copied into panel-body
- Accordion collapsed after initialisation with delay HOT 5
- Accordion: expression is mapped in panel-body, but not in panel-heading
- Accordion render issue when initialized off screen
- Popover - question: Use custom validator
- Is it time to create an angular2_ui package on https://pub.dartlang.org ? HOT 4
- [Carousel] "Transition cancelled" in Dev Tools console HOT 6
- Double Click on Modal Backdrop to Dismiss Gives Error HOT 2
- Unit tests fail with issue: The null object does not have a method '[]'.
- Maintenance HOT 8
- Successive modal component not being injected HOT 1
- Issue 165 Modal HOT 1
- Typeahead highlight only works with the exact match need it to show highlight based on the words HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.dart.ui.