I just added iron:router package to my meteor project and now at the end of my website it shows this
and i can't find it in my html file to delete it,
How can i remove it from my website?
It will disappear when you add any route in your JS file. Add the following empty route to your JS file and start from there.
Router.route('/', function () {
});
Also read the iron-router docs about getting started.
http://iron-meteor.github.io/iron-router/
Related
I've created a new AWS amplify application and just followed the guide to add a login validator, the guide I used is this, which is the official one, but when I start the application what I've got is this:
What's wrong???
My styles.css file has the following content
/* You can add global styles to this file, and also import other style files */
That guide is outdated. Please use this onehttps://ui.docs.amplify.aws/react/getting-started/installation
In short, add this line to your styles.css:
#import "#aws-amplify/ui-react/styles.css";
I'm working within an ASP.NET MVC 4 project. I'd like to use browser-sync to inject changes to markup in our razor syntax views without reloading the page.
I'm using Gulp to automate these browser-sync tasks and the html-injector module (https://github.com/shakyshane/html-injector) to inject html changes.
My goal is:
Run ASP.NET project.
Run Gulp with browsersync task.
Navigate to view A.
Make a change in view A's cshtml file.
See the change in view A without a page reload.
Here is my gulp task:
var gulp = require("gulp");
var browserSync = require("browser-sync").create();
var htmlInjector = require("bs-html-injector");
gulp.task("browserSync", function() {
browserSync.use(htmlInjector, {
files: ['**/*.*html']
});
browserSync.init({
proxy: 'localhost:1234',
files: ['Styles*/**/*.css']
});
});
I'm proxying to port port 1234 because the ASP.NET project runs there.
This configuration works perfectly for plane *.html files. The changes are made in-place with no page reload necessary.
However, for *.cshtml files, it still does a complete page reload every time.
Has anybody managed to make this work? Or is it an inherent ASP.NET/Razor thing that the view must be completely regenerated for every change?
Thanks in advance.
Im trying to adopt JSPM as my package manager for Wordpress development but im failing at loading the main app file.
This is usually done with
<script>
System.import('./app');
</script>
The problem im running into is that jspm fails to load this file, trying to load in context of the current browser path http://localhost:3000/shop/app.js instead of the file system context.
I've tried to adjust some of the jspm's configuration options but couldn't get it to work.
Can you point in the right direction here?
When running on file:/// URLs, you need to set your baseURL to the current path. This can be done with:
System.config({ baseURL: '.' });
Either in your configuration file or in the page itself. Note that when you load pages on different path levels, this baseURL path needs to be adjusted so it may be advisable to specify it in the page itself.
I am using Meteor 1.0.2.1 and iron:router 1.0.7. I have managed to set up a route for '/' which works fine locally however when I deploy on meteor I get the iron:router splash.
Here is my route:
Router.route('/', {name: 'landing.index'});
and I have a controller called LandingIndex and a template called LandingIndex as well.
Any help is greatly appreciated.
edit:
The controllers looks as follows:
LandingIndexController = RouteController.extend({
waitOn: function () {
},
data: function () {
},
action: function () {
this.render();
}
});
In my case I had duplicate templates. A quick look at the console pointed out the problem.
Are you by any chance using Twitter Bootstrap? I ran into this same problem today, non-reproducible on localhost as well. After way too many hours of trying to reproduce this on a remote env with meteor deploy xxxxx.meteor.com, I figured out that it was because of a file contained within Twitter Bootstrap. If you straight up download the .zip file of bootstrap and indiscriminately copy its 3 directories into your project (css/ fonts/ js/), js/npm.js will be copied along with it.
I think js/npm.js is only needed during the build process with Grunt, so I just deleted it. It solved the issue for me, although I'm not sure why...
For me the problem was some files that came from another branch and stayed "untracked" in Git, so I overlook them.
But it looks like mup deploys everything, so it deployed this incorrect files too. In addition to that, Iron Router must be catching exceptions from other stuff, so it showed its splash page.
Just removed the untracked files and the problem was solved with another deploy!
I registered a Route in my route table in the global asax file. When I load the page it loads normally without the new route and my menu works fine, but when i enter in the new url for the route it gives me a javascript error(object expected) for my jquery menu. error is on the
document.ready(function() {})
i've tried changing the order of my scripts but i still get the same problem no matter what.
Im using a master page for my ShowProducts page. When i view the source and have a look at the links to my scripts they still point to the directory where they reside. When you change the url to the mapped route does the url change for the source of the script files.