I am following this small tutorial:
http://docs.sencha.com/extjs/4.2.1/#/guide/application_architecture
I have used the exact same file structure, but when I add the controller section of the tutorial (to my app.js), where the code says:
`Ext.application({
...
controllers: [
'Users'
],
...
});
I get the error shown on the attached image. The system is looking for the controller folder the wrong place. Instead of looking for the file in the following path:
accountmanager/app/controller/Users.js
it looks in:
accountmanager/app/ext-4/app/controller/Users.js
So looking at the tutorial I'm following, the place that causes the trouble, is the section "Defining a controller"
I'm not sure what I have done wrong, I've starred myself blind for an hour now. Here is the index.html file:
<html>
<head>
<title>Account Manager</title>
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css">
<script type="text/javascript" src="ext-debug.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body></body>
</html>
Note the slight difference in the html. Fx. I have only changed the js src reference, since the one in the tutorial causes a 404
Can anyone help out. I'd be grateful.
Thanks in advance
In case you wanna see the app.js code as well:
Ext.application({
requires: ['Ext.container.Viewport'],
name: 'AM',
controllers: [
'Users'
],
appFolder: 'app',
launch: function() {
Ext.create('Ext.container.Viewport', {
layout: 'fit',
items: [
{
xtype: 'panel',
title: 'Users',
html : 'List of users will go here'
}
]
});
}
});
Your app.'s and index.html files is located in the wrong place.
Put it in the root account manager directory
Related
I am trying to add json-ld to my page, but still not working or not what I want.
Here is what I've tried so far:
using useMeta()
useMeta({
script: [
{
type: 'application/ld-json',
json: jsonLd,
},
],
});
result: <script type="application/ld-json" json="[object Object]"></script>
using <Script> tag
<Script type="application/ld-json">
{{ jsonLd }}
</Script>
result: <script type="application/ld+json"></script> empty value.
and
<Script type="application/ld-json" v-html="jsonLd"></Script>
result: <script type="application/ld-json" innerhtml="[object Object]"></script>
Am I missing something?
Thanks.
If in case anyone wondering, this is how I get it to work:
Using
<Script :children="jsonLd" />
Or
useMeta({
script: [
{
type: 'application/ld-json',
children: JSON.stringify(jsonLd),
},
],
});
Nuxt 3 support will be added soon: https://github.com/ymmooot/nuxt-jsonld/issues/763
I'm trying to use Google Material Icons in my react-styleguidist documentation.
In my styleguide.config.js file, I've tried
module.exports = {
template: './template.html'
}
and then added <link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons"> to the <head> tag of the template.html file but react-styleguidist doesn't recognize this format anymore, it seems.
I've tried to use a template and theme as follows:
template: {
head: {
links: [
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Material+Icons'
}
]
}
},
theme: {
fontFamily: {
base: "Material+Icons"
}
}
This just displays the icon name in words rather than the actual icon. I think this method only works for actual fonts like Roboto etc. Any help would be appreciated.
I've found a solution that works for me. May not be the ideal way to do it, but it works.
In my styleguide.config.js I've added:
require: [
path.join(__dirname, '/fonts/material-icons.css'),
]
Inside /fonts/material-icons.css, I've pasted the css from here -
https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp
And that's it. Now I can use something like <span class="material-cions-rounded">group</span> in any of my code files.
I built this bit of code from a pretty long search on the web full of failures trying with various players to play this,
http://85.132.71.4:1935/turktv/ntv.sdp/playlist.m3u8
m3u8 stream. I will put up my compact(paste it into an html file) code in here in hopes someone can point me in the right direction. Thank you for reading.
<html>
<head>
<title>test page</title>
</head>
<body>
<script type='text/javascript' src='http://dev.landgraaf.net/jwplayer.js'></script>
<div id='livefeed'></div>
<script type="text/javascript">
jwplayer('livefeed').setup({
'id': 'playerID',
'width': '480',
'height': '300',
'provider': 'video',
'file': 'http://85.132.71.4:1935/turktv/ntv.sdp/playlist.m3u8',
'image': 'http://dev.landgraaf.net/webcam.jpg',
'bufferlength':5,
'modes': [
{type: 'flash', src: 'http://dev.landgraaf.net/player.swf'},
{
type: 'html5',
config: {
levels: [ {'file': 'http://85.132.71.4:1935/turktv/ntv.sdp/playlist.m3u8'} ],
'provider': 'video',
'x-webkit-airplay': 'allow'
}
}
]
});
</script>
</body>
</html>
M3U8 does not run in Flash mode in JW5. You would need JW6 for this. Here is some more information - http://www.longtailvideo.com/support/jw-player/28856/using-apple-hls-streaming, if you would like a trial of us, please contact us - http://www.jwplayer.com/contact-us/
I was trying to import certain script depending on which URL I'm.
Simple <script> tag in my HTML is:
<html ng-app="myApp">
...
<script type="text/javascript" src="{{srcRoute}}" language="JavaScript"></script>
...
</html>
I was trying to get this after main module "myApp", in a run block:
angular.module('myApp', [])
.config(function($routeProvider) {
$routeProvider.
when('/', {controller: MyController, templateUrl: 'partials/home.html'}).
otherwise({redirectTo: '/'});
})
.run(function($rootScope) {
$rootScope.srcRoute = 'some/route/here.js';
});
but when running this I get something like:
GET myRoute/%7B%7BsrcRoute%7D%7D 404 (Not Found)
What I want to do is add a conditional sentence in the run block to decide which route to use. Is there a way to do this?
Thanks!
According to the example in this website, I followed the steps, but I dont get any output in the browser.
As Stated in the example, the file "index.html" should be in the following path
'D:\xampp\htdocs\helloext\extjs\index.html'
and its"index.html" contents are the following:
<html>
<head>
<title>Hello Ext</title>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
<script type="text/javascript" src="extjs/ext-debug.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body></body>
</html>
when I run this example in both Chrome or FireFox, however, there is not output to be displayed.
Please guide me to have this samll example run correctly
Did you follow the instructions at the end of section 2.1 (Application Structure)? You need to create the app.js file:
Now you're ready to write your application code. Open app.js and
insert the following JavaScript code:
Ext.application({
name: 'HelloExt',
launch: function() {
Ext.create('Ext.container.Viewport', {
layout: 'fit',
items: [
{
title: 'Hello Ext',
html : 'Hello! Welcome to Ext JS.'
}
]
});
}
});